The PAP government had to battle communist elements both within and external to the party. In July 1961, after PAP lost the Anson by-elections, Prime Minister Lee Kuan Yew demanded a motion of confidence. The debate raged through the night and in the final outcome, 27 Assemblymen voted for the PAP government, and 24, including 13 of PAP's left-wing members, either abstained or voted against the motion of confidence. The 13 PAP Assemblymen who had abstained, were expelled from the party. These men went on to form the opposition, Barisan Sosialis.