John D. Williams (right) during his initial court appearance with his attorney Patrick Nickerson at the Capital Judicial Center in April 2018. Williams is accused of killing Somerset County sheriff's deputy Cpl. Eugene Cole. Credit: Gabor Degre

A judge will hear arguments in February over whether an apparent confession by the man accused of killing a Maine sheriff’s deputy in April can be used as evidence in his murder trial.

Lawyers for John D. Williams claim that police beat the 29-year-old when they arrested him after the four-day manhunt prompted by the killing of Somerset County Sheriff’s deputy Cpl. Eugene Cole.

Williams pleaded not guilty in June, and his lawyers wrote in an August court filing that fear of further violence and the effects of opioid withdrawal are what led him to make statements seeming to confess to the killing after his arrest.

[Police ‘beat and pummeled’ suspect before alleged confession to killing deputy, attorney claims]

State prosecutors have yet to file a written response to the claim that the seeming confession was the result of police officers’ “brutal physical force” and “coercive tactics.” But last week, Justice Robert Mullen discussed the matter with both parties and issued an order for a hearing on Feb. 28.

Cole was the first Maine law enforcement officer shot dead while on duty in nearly three decades. Williams is scheduled to be tried for the murder in Portland in June.

Follow the Bangor Daily News on Facebook for the latest Maine news.