Former East Longmeadow selectman Jack Villamaino has pleaded guilty in an absentee ballot fraud scheme prosecutors said was designed to boost his chances in a 2012 Republican primary race for the Legislature.

Villamaino pleaded guilty Monday in Hampden Superior Court to charges including forgery of a document, perjury and conspiracy to violate absentee ballot laws.

Prosecutors said Villamaino and his now-wife changed the party registration of almost 300 Democratic voters without their knowledge, and forged absentee ballot requests for the Republican primary in their names. The scheme was discovered before the ballots were used.

Villamaino's lawyer said political ambition and fear of failure affected his client's judgment.