NEW YORK (AP) — A former prosecutor who used illegal wiretaps to spy on two other people in a love triangle gone bad was sentenced on Friday to a year and a day in prison.

NEW YORK (AP) — A former prosecutor who used illegal wiretaps to spy on two other people in a love triangle gone bad was sentenced on Friday to a year and a day in prison.

Tara Lenich received the sentence from a federal court judge in Brooklyn. The extra day qualifies her for credit for good behavior that could reduce her stay behind bars.

The 42-year-old Lenich pleaded guilty last year to obtaining the illegal wiretaps on the cellphone of a police detective with whom she was having an affair and on the phone of a colleague. She was accused of forging the signatures of judges and creating fake search warrants as part of the scheme.

“My regret for my crimes is profound,” Lenich wrote in a letter to the court before sentencing. “I am so ashamed of my actions and I know I can never undo what I have done.”

The government had sought a two-year sentence for Lenich, saying she damaged the reputation of the Brooklyn district attorney’s office and betrayed the public trust.

Lenich’s attorney, Moe Fodeman, said in a statement that she was thankful for the lesser punishment.

“We are gratified that (the judge) rejected the government’s requested sentence and fashioned one that allows Tara to move forward with her life,” he said.