AUBURN – A Poland man who threatened suicide in a police standoff while due in court on sex charges is expected to spend five years in prison.

Edward Fitzherbert, 62, pleaded guilty Friday to gross sexual assault, failing to appear in court and being a felon in possession of a gun.

Androscoggin County Superior Court Justice Ellen Gorman approved the agreement reached by prosecutors and the defendant.

In that agreement, Fitzherbert was sentenced to 10 years, with all but four years suspended for the sexual assault. A class A felony, he could have gotten 20 years on that charge alone.

He will serve concurrent one-year sentences on the other two charges.

Both sides said they had hoped to avoid a trial at which the victim would have to testify.

Fitzherbert made headlines on Valentine’s Day when he drove his van, with emergency flasher blinking, to St. Mary’s Regional Medical Center emergency room in Lewiston, driving right past the courthouse in Auburn where a jury had convened to hear his case.

He was due to stand trial on charges of three counts of gross sexual assault, two counts of assault and one count of unlawful sexual contact. The charges involved a girl younger than 14.

He held a gun to his head off and on for more than an hour after police surrounded his van. He surrendered peacefully after a tactical team was called in.

Fitzherbert had filed a motion to have his trial moved to a different county after the standoff, claiming he couldn’t get a fair trial because of the pretrial publicity.

His lawyer, Thomas Goodwin, filed a motion Thursday to quit the case because he expected to be called as a witness in charges stemming from the standoff.

But the case never went to trial.

“Mr. Fitzherbert clearly is cutting his losses,” Goodwin said. “He could be getting damaged a lot more than he’s getting damaged here.”

He also wanted to keep the sexual assault victim out of court, Goodwin said.

Assistant District Attorney Deborah Cashman agreed. “It eliminates the need for the young person to have to come to court to testify about extremely personal details she didn’t want to have to talk about in front of a jury,” she said.

As part of the plea agreement, federal authorities agreed to drop possible weapons charges. The agreement also includes a civil charge for creating a police standoff. Fitz- herbert was expected to appear in 8th District Court on that charge Friday afternoon.

He was expected to pay fines with money confiscated by police at the time of his arrest.