John D. Williams, 29, pleaded not guilty to a charge of murder in the slaying of Somerset County sheriff’s Deputy Cpl. Eugene Cole, June 12, 2018.

A Superior Court judge will decide if the alleged confession of the man accused of killing a Somerset County Sheriff’s corporal April 25, 2018, should be thrown out because police “beat and pummeled” it out of him.

Attorneys for John D. Williams, 30, of Madison last year filed a motion to suppress his confession to shooting Cpl. Eugene Cole. They claimed that Williams confessed to killing the officer for fear of future “beatings” and due to the effects of opioid withdrawal.

Justice Robert Mullen will hold a hearing on the motion Thursday and Friday at the Cumberland County Courthouse. The case, scheduled to be tried in June, was moved to Portland shortly after Williams was charged.

Deputy Attorney General Lisa Marchese, who is prosecuting the case, had not filed a response to the motion as of Monday. The prosecutor is expected to oppose the motion. She asked the judge to subpoena records from the ambulance service that treated Williams after a three-day manhunt ended with his capture in late April.

In June, Williams pleaded not guilty to killing Cole, who was the first Maine law enforcement officer shot to death in the line of duty in nearly three decades. The prosecution claims that Cole encountered Williams while on patrol in Norridgewock. After his arrest, Williams allegedly told police he “eliminated” Cole because he was angry with the deputy for arresting his fiancee a few days earlier.

Defense attorney Verne Paradie of Lewiston is expected to argue later this week that Williams’ statements are inadmissible as evidence because they were obtained using “brutal physical force” and “coercive tactics.”

Police from several agencies arrested Williams on April 28, 2018, in a heavily wooded area fewer than 5 miles from the Norridgewock home where Cole’s body was found three days earlier.

Paradie claimed in his motion that Williams put up “zero resistance” but was nonetheless kicked in the head and face “causing severe bruising.”

In the mug shot released after his arrest, Williams had a black eye. In May, Stephen McCausland, spokesman for the Maine State Police said that Williams was injured while putting up “limited resistance” to police but did not offer specifics of what happened.

Paradie said late Monday that “officers involved in the arrest and escort of Mr. Williams out of the woods admit to physically striking Mr. Williams while he was face down on the ground with two handcuffs on and to verbally taunting him as they walked him out of the woods.”

The attorney said he expected Williams would take the stand to testify about his arrest that day and a later interview by detectives.

Marchese did not respond Monday to a request for comment.

There is no timeline under which the judge must issue a decision other than the trial date.