If $\varphi : S \to T$ is a surjective semigroup homomorphism between semigroups and $G \subseteq T$ is a group, then is $\varphi^{-1}(G)$ also a group?
I know that this result holds if $S$ and $T$ are finite, as then I can find an idempotent element in $\varphi^{-1}(1_G)$ and everything follows from that. But I cannot prove it for infinite semigroups, nor can I find a counter-example.