A discrete countable group Gamma is said to be ME rigid if any discrete countable group that is ME to Gamma is virtually isomorphic to Gamma. In this paper, we construct ME rigid groups by amalgamating two groups satisfying rigidity in a sense of measure equivalence. A class of amalgamated free products is introduced, and discrete countable groups which are measure equivalent to a group in that class are investigated.