Gallagher wobbles to victory as party takes 10 seats