A state trooper who was convicted in April of a dozen sex crimes against a girl younger than 14 has been given a five-year prison sentence.

District Attorney Geoffrey Rushlau, whose office prosecuted the case, said Gregory Vrooman, 46, of Nobleboro will serve 21 months in prison, with 39 months suspended.

After being sentenced last week in a courtroom in Bath, Vrooman was released on $25,000 unsecured bail, Rushlau said.

Rushlau said Vrooman’s attorney, Steven Peterson of Rockport, has indicated that he plans to appeal his client’s sentence to the Maine Supreme Judicial Court. Peterson could not be reached for comment Monday.

Vrooman’s case took a strange turn in April, when he was attacked and injured in a Wiscasset courtroom just moments before the jury in his trial was expected to render its verdict.

Witnesses said William Harrison, 39, jumped Vrooman, who was seated next to his attorney, and landed two punches before he was subdued by court officers. Vrooman was removed from the courtroom on a stretcher.

Harrison, who lives in Charlestown, Mass., was charged with aggravated assault.

“We were on the verge of getting a verdict,” Rushlau told The Portland Press Herald at the time. “This was bizarre and unprecedented.”

One day later, the jury convicted Vrooman of four counts of unlawful sexual contact with a minor, four counts of unlawful sexual touching and four counts of assault.

Rushlau said it could take several months before the supreme court hears Vrooman’s appeal.

Vrooman, a 24-year veteran of the Maine State Police, was arrested in November 2010.