SAN DIEGO (AP) — An aide to former San Diego-area congressional candidate Carl DeMaio has pleaded guilty to obstruction of justice over a threatening email that he suggested came from the candidate when he wrote it himself.

Todd Bosnich appeared in federal court in Friday alongside his lawyer, who said the former campaign worker was ready to move on with his life.

Bosnich rocked a hotly contested race by claiming DeMaio sexually harassed him and that he was offered $50,000 to keep quiet. DeMaio, in turn, identified Bosnich as a suspect in a campaign office burglary. Prosecutors declined to file charges on the harassment or burglary allegations.

DeMaio, an openly gay Republican, lost to Democrat Scott Peters by 3.2 percentage points.

Prosecutors will recommend that Bosnich get probation when he is sentenced Aug. 31.

Copyright 2015 The Associated Press. All rights reserved. This material may not be published, broadcast, rewritten or redistributed.