A former U.S. attorney who resigned under pressure in 2004 after the U.S. Justice Department determined he had abused his authority is facing a felony aggravated stalking charge, according to court documents.

Richard S. Thompson, U.S. attorney of the Southern District of Georgia from 2001 to 2004, spent a week in the Glynn County Detention Center near St. Simons Island before he was released on bond Monday, detention center personnel confirmed.

Thompson was released only after agreeing to report immediately to a psychiatric hospital in Jacksonville, Florida. for treatment after posting a $10,000 surety bond, according to special conditions listed on the bond order. Thompson’s bond conditions also require that he complete a state-sponsored, 24-week family violence intervention program intended to rehabilitate defendants charged with family violence offenses.

On Tuesday, Thompson resigned from his southeast Georgia law firm, said Nathan Levy, Thompson’s former partner. Formerly known as Levy, Thompson, Sibley & Hand, the firm changed its name Tuesday to Levy, Sibley, Foreman & Speir, Levy said.

Levy would not comment on the pending felony charge against Thompson. “He’s tendered his resignation, and we’ve accepted it,” he said.

Thompson’s lawyer, Brunswick attorney Robert Crowe, was in trial Tuesday and Wednesday and did not reply to requests for comment.

As a condition of his release, the former federal prosecutor was also ordered to have no contact with a St. Simons Island attorney and a woman that the lawyer— Donna Crossland of Taylor Odachowski Schmidt Crossland—identified as her client and Thompson’s former girlfriend. Crossland would not identify her client because of what she said was Thompson’s lengthy history of aggressively harassing, following and attempting to besmirch her client. Thompson, she said, has also violated multiple protective orders since the relationship ended in April 2016. But Crossland agreed to talk about the accumulating circumstances, documented in multiple court records, that led to Thompson’s arrest.

Crossland said Thompson began surveilling his former lover soon after their breakup, “He would drive by the house, pound on the front door, park outside of the house and watch, park outside of [her] work and watch, follow her in the car while she was walking her dog,” she said. He sent emails disparaging the woman to friends and members of her family, the lawyer said, including her father, a preacher. She eventually sought a restraining order.

Crossland said she contacted Thompson, who represented himself until he was jailed. She and Thompson eventually drew up, and Thompson signed, a civil contract with far broader stay-away provisions than the protective order Crossland’s client originally had sought. Thompson, she said, “violated it immediately.”

In June 2016, Crossland sought a protective order from Brunswick Circuit Superior Court Judge Stephen Scarlett. While awaiting a hearing on the order, Crossland said that Thompson continued to park across the street from her client’s home and follow her as she walked her dog, at one point trailing her on foot for two miles down the beach, Crossland said.

The following month, Scarlett signed a new permanent protective order, including a new 200-yard stay-away provision for both Thompson and his ex.

Thompson violated that order, too, then used the mutual stay-away terms to continue his harassment, according to Crossland and court records backing up her account.

Crossland said her client’s daughter was to be married on St. Simons in October 2016 and that some of the festivities were to take place at a club to which Thompson belonged. Before the wedding, Crossland said Thompson notified her client that he had scheduled a golf date and dinner the same day and that, if she attended any wedding festivities, he would have her arrested for violating the protective order—unless she paid him $5,500, one court order said.

Crossland went back to court, applied for an aggravated stalking warrant, then obtained a sweeping protective order that barred Thompson from St. Simons the weekend of the wedding and dropped the provision that her client must stay 200 yards away from Thompson. The stay-away provision for Thompson remained in place.

It was, Brunswick Circuit Superior Court Judge Anthony Harrison warned, Thompson’s last chance to avoid a felony charge that would jeopardize his law license and send him to jail.

Crossland said that, for the next six months, Thompson left her client alone. But last April, after the felony warrant application was dismissed, he once more began violating the stay-away order and escalated his threatening behavior, Crossland said.

In a steady stream of emails to Crossland included in court papers, Thompson also threatened legal action against her client, hinting at investigations by the Georgia Bureau of Investigation, the FBI and The Atlanta Journal-Constitution. Thompson also referenced criminal prosecutions he had launched while U.S. attorney, including his conviction of a physician accused of hatching a plot to have his ex-wife slain and two high-profile political prosecutions.

Thompson’s threats carried added weight given his departure as U.S. attorney. In 2002, Atlanta attorney Craig Gillen formally complained to the Justice Department’s Office of Professional Responsibility after Gillen’s client, former Georgia state Senator Donnie Lavan Streat Sr., was cleared of state influence-peddling charges. Thompson announced that he had opened his own investigation of Streat. Gillen claimed Thompson’s actions were intended to help a Thompson friend and political ally who was running for Streat’s state Senate seat.

The Justice Department eventually concluded that Thompson’s actions violated department policy barring interference with an election without a legitimate law enforcement purpose and that Thompson had abused his authority in announcing he was investigating Streat.

On June 29, Crossland said her client—feeling increasingly alarmed for her personal safety—renewed her application for an aggravated stalking warrant against Thompson. At the end of a magistrate hearing last week, Thompson was immediately taken into custody, the lawyer said. He remained jailed until Monday. This time, Crossland said, “We have no intention of dropping the criminal charge. My client has given him every opportunity to comply voluntarily, and after three court orders, she has no confidence he will comply if she were to drop the charge.”