We extend a classical theorem by H. Lewy to planar σ-harmonic mappings, that is mappings U whose components u1 and u2 solve a divergence structure elliptic equation div (σ∇ ui)=0, for i=1,2. A similar result is established for pairs of solutions of certain second order non--divergence equations.