PORTLAND, Maine — The man accused of killing Somerset County Sheriff's Deputy Cpl. Eugene Cole was in court Thursday to attempt to have his confession thrown out.

John Williams' lawyer claims his defendant's confession was coerced after police beat him on April 28, 2018, when they captured him after a nearly four-day manhunt.

RELATED: 'Beaten and coerced': Attorney for accused deputy killer wants confession thrown out
RELATED: Attorney: Accused deputy killer was 'beat and pummeled' to point of defecation

Among the witnesses called Thursday were three of the police officers assigned to the search team that ultimately arrested Williams: Maine State Police Trooper Glenn Lang, Maine Game Warden Jeremy Judd, and FBI special agent David Scullion.

Also called to testify were a doctor who specializes in addiction medicine, and a social psychologist who studies coerced confessions. Neither had met, spoken to, or evaluated John Williams, but had read the records associated with his case. 

Dr. John Steinberg, who specializes in addiction medicine, took the stand Thursday. He said he never met, treated, or evaluated Williams.

Much of Dr. Steinberg's testimony focused on whether Williams was withdrawing or not and if any possible withdrawal symptoms would have affected his willingness to give a confession.

Williams "clearly had substance abuse and a dependency disorder," Steinberg testified. The doctor said he believes that under daily stimulant and opiate use for the prior 15 months Williams was in withdrawal -- exacerbated by sleep deprivation and exposure to elements during the four-day manhunt, having no food or water.

RELATED: Timeline of John Williams' movements on night of Cpl. Cole's murder

Steinberg said Williams would not have been able to make rational decisions under the conditions and stress of withdrawing and being on the run from police in the woods.

“I think he would have done anything to get to sleep,” said Steinberg.

Maine's attorney general suggested that the surprise appearance of law enforcement officers outside the cabin where Williams was found could possibly have led Williams to defecate himself, however, Steinberg argued it was more likely caused by his opiate withdrawal.

Steinberg believed officers should have waited for Williams to sufficiently sleep, eat, and possibly finish withdrawing before questioning him. Williams confessed to a different set of detectives at the Waterville Police Department in the hours following his capture.

The state also cross-examined a social psychologist, who said people who are under stress of isolation, hunger, fatigue, and pain can lose the ability to self-regulate and make decisions.

That psychologist, Dr. Brian Cutler, said he believes Williams understood the Miranda warnings and explained back to officers what those were.

Following a lunch break, former Maine State Police Lt. Glenn Lang, who worked in the agency's Computer Crimes Unit, was called to provide his account.

Lang responded to Norridgewock and volunteered in the search for Williams.

On Thursday, Lang referenced exhibits by the state, including a map and photos to show how the tactical team moved through a wooded area and approached the cabin in which Williams was found.

Lang said he first saw Williams when one of his fellow officers suddenly shouted, "get down!" He said he approached Williams with his rifle drawn and directed it at the suspect, also demanding that he get down on the ground. He was the first in the group one to reach Williams, he said, and knelt on his head/shoulder area to hold him down and put handcuffs on him.

Lang said Williams would not offer his right hand to put in the cuffs, so he struck him in the head two or three times. He said he told Williams to "stop resisting," and that Williams replied, "OK, OK." Williams then complied, Lang said, and handcuffs were successfully applied.

Lang said he removed the long-john-style pants Williams was wearing, due to the possibility of him being armed, and found that he had defecated himself "all the way down" his leg which he said indicated Williams had done so while standing up.

Lang said his intention was never to scare Williams when hitting him, only to have him comply with the handcuffs. He said no one else hit or struck Williams at the cabin site.

As for the photo which was widely circulated, to which Maine State Police defended, Lang said the command post asked for a picture of Williams to confirm his identity but Williams did not comply, tucking his chin down. 

"I simply grabbed his hair, pulled it back and snapped the photo," said Lang.

Lang said neither he nor any of the other officers ever taunted or threatened Williams during the arrest.

Williams' lawyer asked Lang if Warden Jeremy Judd had been standing on Williams' right hand – the same one Lang claimed Williams resisted surrendering to cuffs. Lang replied saying, to his knowledge, Judd was not on Williams' hand.

Warden Jeremy Judd spoke next. He was another member of the search team.

Judd said he heard what he thought was a loud scream, possibly from a woman, as they were resting near a bog. They walked through the woods trying to locate the voice, so they started moving toward the cabin, which they had been told by command staff was nearby.

The group's attention suddenly turned to the cabin, Judd said, when another loud sound was heard, seemingly originating from the structure.

During the arrest, Judd said he heard Lang tell Williams to "give me your f-ing arm." Judd said he was standing on Williams' right hand, partially contradicting an earlier statement from Lang. He said he was on the hand for a few seconds. When Lang reached for Williams' right hand Judd said he took his foot off of him.

"My argument would be that the inconsistencies go towards the credibility," said Williams' lawyer, Verne Paradie. "Whether the judge buys that or not, I can't say. Mr. Williams will likely have a different story and the judge will have decide who he believes."

Both Lang and Judd said the time between the group first spotting Williams and getting him in handcuffs was about 30-45 seconds. Judd said he did not see anyone hit Williams nor threaten or taunt him.

Judd said Trooper Robert Burke whispered something in Williams' ear and then applied Cpl. Cole's handcuffs.

FBI special agent David Scullion, also a member of the team, was called next.

He confirmed that Judd was standing on Williams' hand/wrist, and also noted that he saw Trooper Burke say something to Williams, but could not hear what he said.

Williams' lawyer said Williams maintains he was kicked. Both Judd and Lang said they never saw any other officers hit or kick Williams.

Testimony continues Friday with Trooper Burke, plus a Fairfield Police officer who was also part of the search team, as well as three hours of video showing the interrogation and the confession by Williams at Waterville Police.