It was pointed out by Shifman and Yung that the critical superstring on X10=R4×Y6, where Y6 is the resolved conifold, appears as an effective theory for a U(2) Yang–Mills–Higgs system with four fundamental Higgs scalars defined on Σ2×R2, where Σ2 is a two-dimensional Lorentzian manifold. Their Yang–Mills model supports semilocal vortices on R2⊂Σ2×R2 with a moduli space X10. When the moduli of slowly moving thin vortices depend on the coordinates of Σ2, the vortex strings can be identified with critical fundamental strings. We show that similar results can be obtained for the low-energy limit of pure Yang–Mills theory on Σ2×Tp2, where Tp2 is a two-dimensional torus with a puncture p. The solitonic vortices of Shifman and Yung then get replaced by flat connections. Various ten-dimensional superstring target spaces can be obtained as moduli spaces of flat connections on Tp2, depending on the choice of the gauge group. The full Green–Schwarz sigma model requires extending the gauge group to a supergroup and augmenting the action with a topological term.