PORTLAND, Maine — The state’s highest court has rejected the appeal of a 46-year-old man who was sentenced to 55 years in prison for raping a Rockport woman at knifepoint at her home in 2010.

The Maine Supreme Judicial Court ruled that Superior Court Justice Jeffrey Hjelm was correct in deciding that Bradley Lemay could be tried on a variety of charges at one trial. Lemay’s attorney had argued that the judge had abused his discretion by combining the trials of separate offenses that occurred on different cases.

Lemay was convicted by a jury in June 2011 of gross sexual assault, criminal threatening with a dangerous weapon, eluding police and tampering with a victim. Hjelm sentenced him later that month to 55 years in prison.

Lemay had spent more than 20 years in prison previously for kidnapping and sex offenses and had been out of prison for only four months when he attacked the Rockport woman at her home. Hjelm had noted that the assault was a “horrific four-hour ordeal.”

Lemay had been employed by the landscaping firm that did work on the woman’s home. He appeared at her home one night, entered the house, and held her at knifepoint while he sexually assaulted her.

He led police on a high-speed chase after he left the woman’s home and was captured in Rockland at gunpoint.

While in jail, Lemay sent a letter to his brother asking him to contact the victim and offer her $150,000 to drop the charges. He also asked his brother to threaten the woman if she refused the offer. The brother went to police.

Lemay also tried to escape from the Knox County Jail while he was being held there.

Lemay had argued before the Supreme Judicial Court that the judge should not have combined the offenses that occurred on separate dates.