We show that the Fourier transforms of the admissible irreducible representations of the group GL2 over a nonarchimedian local field F are characterized by a functional equation (MF). We also prove that the functions satisfying (MF) and having at most one pole are exactly the Fourier transforms of the irreducible representations of the quaternion group H over F. The Jacquet-Langlands correspondence between irreducible representations of H and discrete series of GL2 then follows immediately from our criteria.