FILE: Former Virginia delegate Joseph D. Morrissey. (Jahi Chikwendiu/The Washington Post)

A judge on Wednesday dismissed a four-count felony indictment against Joseph D. Morrissey, the former Virginia lawmaker who spent his nights behind bars during the recent legislative session.

Morrissey had faced charges that he presented forged documents during a court proceeding in a related case, in which he was accused of having sex with and sharing photos of a then-17-year-old receptionist at his law office.

During a hearing that coincided with April Fools’ Day, retired Alexandria judge Alfred D. Swersky ruled that a plea agreement reached in the case barred him from facing further charges, so he dropped the latest indictment.

“This is the very first time we’ve had the opportunity to give the judge our side of the story . . . and then he dismissed all of the indictments against me. There is certainly a great measure of vindication,” Morrissey said in a phone interview after the hearing.

Arlington County Commonwealth’s Attorney Theo Stamos said the prosecution is considering appealing the judge’s decision. Stamos inherited the case from Spotsylvania Commonwealth’s Attorney William F. Neely, who drafted the plea agreement. “We’re going to move as swiftly as we can to see if there’s another avenue to have an appellate court look at the decision,” she said.

With a break in his latest legal battle, Morrissey is planning to run for state Senate, but he has hit a roadblock from leaders of the Democratic Party, whom he accuses of tossing out legitimate signatures he had collected to get his name on the primary ballot.

Morrissey, 57, previously served several terms in the House as a Democrat, but won re-election as an independent earlier this year.

The latest saga in his long history of legal skirmishes came to a head in December when Morrissey signed a plea agreement on a misdemeanor charge of contributing to the delinquency of a minor, but he admitted no guilt.

About a month later, voters in what was then his Henrico district sent him back to the House of Delegates to legislate while serving a work-release jail sentence.

Lawmakers already considering censuring or even expelling him expressed chagrin over the continuing drama when a four-count indictment was unsealed against Morrissey the following week.

All along, Morrissey has denied any wrongdoing. Although he was stripped of his committee assignments, he faced no formal punishment, in the end.

In March, Morrissey traveled to Georgia for the birth of a baby boy to the young woman, now 18, with whom he was accused of having an improper relationship. He has declined to say whether he is the child’s father.

A few weeks later, he moved to Richmond, resigned from the House and announced his plan to run for the Senate seat currently held by Rosalyn R. Dance (D-Petersburg). Del. Joseph Preston (D-Petersburg) is also running in the June primary.

Meanwhile, Morrissey said he plans to file a civil suit over the case stemming from his relationship with the woman.

“Stay tuned,” he said, adding: “These people are going to find out why Joe Morrissey is known as never ever, ever quitting.”