We investigate the integrability of cosmic strings in Bianchi II, VIII
and IX spacetimes using a Lie symmetry analysis. The behaviour of the
gravitational field is governed by solutions of a single second order
nonlinear differential equation. We demonstrate that this equation is
integrable and admits an infinite family of physically reasonable sol
utions. Particular solutions obtained by other authors are shown to be
special cases of our class of solutions.