James Sweeney Credit: Courtesy of Franklin County Sheriff's Office via CBS 13

PORTLAND, Maine — The Maine Supreme Court on Tuesday upheld the conviction and sentence of a Jay man who killed his girlfriend with a baseball bat while she slept.

The Supreme Judicial Court on Tuesday rejected James Sweeney’s argument that the conviction should be overturned because the trial judge allowed improper testimony.

The justices unanimously found that the hearsay testimony from the victim’s mother amounted to a “harmless error.” The court also upheld the 38-year sentence imposed on Sweeney.

Sweeney was convicted of murder in the 2017 killing of 51-year-old Wendy Douglas, who had ended their decade-long relationship. Police say Sweeney killed Douglas by beating her on the head while she slept in her Jay home.

Sweeney, who is deaf, turned himself in after the fatal beating and gave police a note that said, “I am going to jail ‘cause I hurt my girlfriend.”