The exterior square L-function attached to an automorphic cuspidal representation of GL(2n) has a pole if and only if a certain period integral does not vanish on the space of the representation. We conjecture, in the "if" direction, a similar result is true for representations of GL(2)(D), where D is a division algebra. We prove a partial result which provides evidence for the conjecture. The proof is based on a relative trace formula.