The singularly perturbed two-well problem in the theory of solid-solid phase transitions takes the formwhere u : ⊂ R n → R n is the deformation, and W vanishes for all matrices in K = SO(n)A ∪ SO(n)B. We focus on the case n = 2 and derive, by means of Gamma convergence, a sharp-interface limit for I ε . The proof is based on a rigidity estimate for low-energy functions. Our rigidity argument also gives an optimal two-well Liouville estimate: if ∇u has a small BV norm (compared to the diameter of the domain), then, in the L 1 sense, either the distance of ∇u from SO(2)A or the one from SO(2)B is controlled by the distance of ∇u from K . This implies that the oscillation of ∇u in weak L 1 is controlled by the L 1 norm of the distance of ∇u to K .