A Labour MP’s former head of communications felt “morally and legally” obliged to come forward after reading that the politician had tried to avoid a speeding offence on the night she visited him, a court heard.

Fiona Onasanya, the MP for Peterborough, returned a form to the police that said her former lodger was driving her car on 24 July 2017 when it was recorded driving over the speed limit near Thornley, Cambridgeshire.

Dr Christian DeFeo, who also managed campaigns for Onasanya, said he was compelled to contact police this week to tell them she had driven alone to his home near Thornley on the evening her car was recorded travelling at 41mph in a 30mph zone.

Onasanya, a solicitor, denies one count of perverting the course of justice after filling in a form claiming that her former Russian lodger Aleks Antipow had been driving her car on 24 July 2017 near where DeFeo lived at that time.

DeFeo told the court at the Old Bailey he discussed with his wife, Caroline Earle, whether to give evidence against the MP after reading a news report about her trial on Tuesday.

He told the court he had “enormous hopes invested” in Onasanya, who was elected in 2017.

He said: “I never dreamed in my darkest dreams – I never thought I would have to be sitting here [giving evidence]. It is with the greatest reluctance I have to do this. To do otherwise, I cannot. It’s morally and legally unacceptable not to.”

Onasanya is accused of plotting with her brother, Festus Onasanya, to claim that her former Russian lodger was behind the wheel of her Nissan Micra when it was recorded breaking the speed limit on The Causeway near Thornley.

The incident happened near where DeFeo lived at the time. The court was told about an email exchange between Onasanya and DeFeo, arranging to meet on 24 July last year, a week after Onasanya was elected MP.

Asked what time she was there, DeFeo said: “I cannot say a specific time. However, she arrived late and was there quite late because we offered her a bed to stay the night. She arrived in her car. She arrived alone. She pulled up her car in front of our house. I greeted her at the door.”

He said Onasanya, his wife and himself spent at least two hours discussing the “nitty gritty” of a charity lease in his living room. They were there together throughout, apart from the occasional “loo breaks” and his wife going into the kitchen to prepare a “hot lemon squash”.

DeFeo said Onasanya had been to his home three or four times, including when he threw a “victory party” to celebrate her election, accompanied by her mother.

Onasanya’s brother has pleaded guilty to three charges of perverting the course of justice, including to one charge related to the 24 July incident.

Antipow was not the driver who committed the July 2017 offence but was instead a former tenant who had lived for a month in a property, which was jointly rented by Onasanya and her brother, the prosecution said.

The telephone number attributed to Antipow on the NIP (notice of intended prosecution) form belonged to a firm for which Onasanya’s brother had worked as a delivery driver, the court heard.

Police examined Onasanya’s mobile phone records and found that both her phones were in Thornley at the time the offence took place, the prosecution claimed.

The trial continues.