A defendant on trial for the murder of a Gainsborough man was accused of confessing to the killing during his evidence from the witness box.
Prosecuting barrister Katherine Goddard QC, in her closing speech to the jury at Lincoln Crown Court said that Kieran Walker told over 40 lies during police interviews following his arrest for the murder of Jordan O'Brien.
Miss Goddard said: "If you go through there are over 40 lies all calculated to throw the police off the scent so that he could get off.
The jury has heard that when first arrested Walker said he was not present when Mr O'Brien was attacked with a machete on Scampton Way, Gainsborough.
But in evidence he told the jury that he was the driver who transported the killer to and from the scene in a stolen car but did not leave the vehicle.
He refused to name the man he claimed was the passenger and who has been described by the prosecution as Man X.
Miss Goddard said that when Walker was questioned in court about whether he heard any conversation between Man X and Jordan O'Brien the defendant went on to confess that he himself was the attacker.
Miss Goddard said: "It says he was the killer. It says he was the murderer."
She added: "His latest account makes absolutely no sense. It is an account that does not stand up to basic examination."
Jordan O'Brien is alleged to have been targeted by Walker, a self confessed drug dealer, over a £2,000 drug debt.
The jury has been told that Jordan suffered catastrophic injuries after being attacked with a machete and died later in hospital.
Jordan's mother Denise O'Brien , in evidence, said that she saw Walker climbing into the passenger seat of the getaway car after the attack and shouted at him to come back. She told the jury that her son named Kieran Walker as his attacker in his final words to her.
Walker in his evidence told the jury: "I have never caused serious harm to anybody. If somebody doesn't pay up I'll threaten them. If they carry on I'll find out where they are and beat them up but there's no point in using a weapon as I'll end up in jail and wouldn't be able to get my money."
He said that when he drove to Gainsborough he was accompanied by another man to help intimidate those who owed him money.
"I didn't plan to take a weapon. I was the driver. I first saw the machete as soon as he got into the passenger seat. I wasn't expecting to see that. It quite alarmed me."
Kieran Walker, 23, of Larch Avenue, Auckley, Doncaster, denies murder.
The trial continues