Christopher Jennings, one of the prosecution’s key witnesses in the murder trial of Anthony Pratt Jr., spent nearly six hours on the witness stand Wednesday admitting to lying to police repeatedly as they investigated the death of the Westbrook woman Pratt is accused of killing in 2012.

Jennings, a convicted felon and admitted drug dealer, said he lied to police about the gun that was used to kill 29-year-old Margarita Fisenko Scott, and about having sex with her shortly before he died. He admitted that when police discovered one lie, he followed up with another.

Jennings’ testimony in the third day of Pratt’s trial at the Cumberland County Courthouse in Portland is pivotal to the case, since Pratt’s attorneys have presented Jennings and his wife as alternate suspects in the killing.

Jennings testified all morning Wednesday before admitting under cross-examination by one of Pratt’s attorneys that he first lied to Portland detectives on Jan. 23, 2013, less than a week after Scott’s body of was found in the back of a snow-covered Chevrolet Trailblazer in the parking lot of the Motel 6 on Riverside Street.

Jennings lied to police in that first interview about his street name, “Red,” which could be used to connect him to Scott, a crack cocaine addict who bought drugs from him and stayed at his apartment.

Jennings lied to detectives again in March, when they confronted him with evidence that his DNA was on the pistol that was used to kill Scott, and that his semen was found in her body, indicating he was the last person to have sex with her before she died.

“You lied about the gun?” asked Pratt’s attorney, Peter Cyr, in a rapid series of questions, his voice growing louder and filling the courtroom.

“Yes,” Jennings said, facing the jurors.

“You lied about sex with Rita?” Cyr asked, using Scott’s nickname.

“I told them we had oral sex, but that there was no (intercourse),” Jennings replied.

That exchange came just before Justice Thomas Warren called for the lunch recess.

As Cyr continued to question Jennings late into the afternoon, often reading a transcript of Jennings’ statements to police, Jennings slowly admitted to more and more lies to police.

Only Jennings’ and his wife’s DNA was found on the .40-caliber pistol, not Pratt’s. Police found the gun at the Jennings’ home in Portland.

Jennings said he lied only because he didn’t want his wife, Tunile Jennings, to know that he cheated on her, and because he had a prior felony gun conviction so he was prohibited from possessing another firearm.

Jennings also testified about moving to Portland in February 2012 and establishing a crack cocaine dealing business, smuggling drugs weekly from his home in Queens, New York, to Maine.

He said Pratt followed him here months later, joined the drug dealing business and quickly began a romantic relationship with Scott, a married drug addict who bought crack cocaine from them.

Pratt, 21, of Queens, New York, is accused of shooting Scott on Nov. 11, 2012, in an apartment on West Concord Street in Portland, where Pratt and Scott were living temporarily with Jennings and his wife.

Pratt allegedly loaded Scott’s body in the back of her Chevrolet Trailblazer and drove the SUV to the motel parking lot on Riverside Street, where it stayed unnoticed until her husband, Cary Scott, found her.

Prosecutors acted pre-emptively when they called Jennings to the stand in the morning and then Tunile Jennings in the late afternoon, asking each one directly whether they killed Scott.

Both denied killing her and said they didn’t know Scott was dead until after her body was found on Jan. 17, 2013.

Tunile Jennings described one of her last encounters with Scott, late at night on Nov. 10, 2012, while Scott drove the couple to Portland’s Old Port for a night out to celebrate Christopher Jennings’ birthday.

Tunile Jennings said she was intoxicated that night, and told Scott that she would kill her if Scott ever had sex with her husband.

“It was a figure of speech,” Tunile Jennings said, answering a prosecutor’s questions. “It wasn’t a threat.”

She said she last spoke to Scott on the phone around 1 a.m. on Nov. 11, to tell her they didn’t need a ride and would take a cab home. When they returned home from a strip club around 3:05 a.m., Pratt was asleep on the couch with her infant son on his chest, and the house was dark, she said.

Police allege Pratt killed Scott sometime between that 1 a.m. phone call and when the Jenningses returned home. Pratt returned to New York the next afternoon to aid his sick grandfather.

Tunile Jennings is scheduled to return to the witness stand Thursday for cross-examination by one of Pratt’s attorneys.

Neither Christopher nor Tunile Jennings has been charged in connection with Scott’s death.

Pratt has pleaded not guilty to a single count of murder and has been held without bail since his arrest in New York in April 2013.