A former Brooklyn prosecutor who admitted to forging judicial orders to run illegal wiretaps on a fellow prosecutor and a New York City police detective has been sentenced to one year in prison.

Tara Lenich, 42, who began working with the Brooklyn District Attorney's Office in 2005 and served as the deputy chief of special investigations for the office at the time of her arrest, pleaded guilty last year to two counts of illegal interception of communications, a class D felony.

U.S. District Judge William Kuntz II of the Eastern District of New York imposed a 12-month sentence on each count, to run concurrently. Alluding to several works by Shakespeare, the judge called the case a “tragedy” in which Lenich served as the protagonist.

“The protagonist driven by a fatal and tragic flaw causes a tragedy,” Kuntz said.

According to court papers and statements by Kuntz, Lenich and attorneys present for Lenich's sentencing, Lenich forged judges' signatures by cutting them from legitimate documents, taping them to wiretap orders she created and sending them to cellphone providers.

Lenich used the forged orders to tap into the phones of fellow Brooklyn prosecutor Stephanie Rosenfeld and an NYPD detective identified in media reports as Jarrett Lemieux; Lenich listened to their calls and read their text messages between June 2016 and November 2016.

Addressing the court at her sentencing, Lenich said while choking back tears that she developed a “completely destructive personal and professional” relationship with the detective while they were working together on a major investigation, and said the tryst had a “negative effect” on the case.

“I don't know how listening to those calls was ever going to help in the twisted situation I was in,” Lenich said.

Reading from papers in the case, Kuntz said that Lenich's relationship with the detective came to a “volatile end” and that the detective allegedly began a new relationship with a different Brooklyn prosecutor.

Lenich's attorneys, highlighting her lack of a prior criminal record and the fact that she has been disbarred as a result of her conviction, asked for a sentence of eight months of house arrest with community service.

Morris Fodeman, a partner at Wilson Sonsini Goodrich & Rosati, said at sentencing that Lenich “lost her way” and “made a series of terrible choices.”

“Tara Lenich will never be the poster child for having gotten away with something,” Fodeman said.

But prosecutors pushed for an above-guideline sentence of 24 months in prison.

Assistant U.S. Attorney Robert Polemeni of the Eastern District said Lenich lied to her subordinates and to police during the illegal wiretaps to hide her tracks, that the wiretaps resulted in the Brooklyn DA's office having to review “hundreds” of cases and that she would have continued the conduct if she hadn't been caught.

“She's was given an immense amount of power and authority and she abused it repeatedly,” Polemeni said.

Delivering the sentence, Kuntz said the government's suggested term was too harsh. He said to Lenich that while he understands the desire to know more about a love interest, “you can't use your power in hand to peak.”

“Every person in this courtroom has at some point kind of wanted to know what a love interest or a love rival might be up to,” the judge said.

Assistant U.S. Attorney Maria Cruz Melendez also appeared for the government in the case.

Manhattan solo attorney Gary Farrell also appeared for Lenich in the criminal case and in her attorney disciplinary proceedings.

The Appellate Division, Second Department disbarred Lenich in December and, according to court papers, disbarment proceedings against Lenich are now underway in Connecticut.

In December, Rosenfeld, who filed a victim impact statement in Lenich's criminal case, filed a suit against Lenich alleging violations of the Electronic Communications Privacy Act and the First and Fourteenth Amendments.

On Thursday, Brooklyn District Attorney Eric Gonzalez, Assistant DA William Schaeffer, who supervised Lenich; Assistant DA Brian Donahue, who was charged with reviewing wiretap orders from the office; and LuShawn Thompson, the widow of the late Brooklyn DA Kenneth Thompson, were added as defendants in the suit.

Rosenfeld was represented by Richard Emery and Samuel Shapiro of Emery Celli Brinckerhoff & Abady.