BATH — A  state trooper who was convicted in April of a dozen sex crimes involving a girl under the age of 14 will spend less than two years in prison.

District Attorney Geoffrey Rushlau, whose office prosecuted the case, said 46-year-old Gregory Vrooman of Nobleboro was sentenced to five years in prison, with all but 21 months suspended.

After being sentenced last week in a Bath courtroom by Justice Jeffrey Hjelm, Vrooman was released on $25,000 unsecured bail.

Rushlau said Vrooman’s attorney, Steven Peterson of Rockport, has indicated that he plans to appeal his client’s sentence to the state’s supreme 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 39-year-old William Harrison jumped Vrooman, who was seated next to his attorney, and landed two punches before he could be subdued by court officers. Vrooman had to be removed from the courtroom on a stretcher.

Harrison, who lives in Charlestown, Mass., was charged with Class B aggravated assault before making bail.

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

The day after the courtroom brawl took place, a 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 Maine Supreme Judicial Court hears Vrooman’s appeal.

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