Dominic Cummings, the PM's former chief adviser, has unleashed an all-out attack on Boris Johnson and his government, denying he was the source of a leak of the PM's texts and claiming Mr Johnson actions fall "far below the standards of competence and integrity".
In a 1,000-word blog post, Mr Cummings also wrote that attempts to get a Conservative donor to secretly pay for lavish refurbishments of the prime minister's Downing Street flat was "unethical, foolish, possibly illegal and almost certainly broke the rules".
And he accused Downing Street's director of communications of "false accusations to the media".
The leak revealed Mr Johnson had promised Sir James he would "fix" a tax issue for Dyson staff working to develop ventilators early on in the pandemic.
Mr Cummings said: "I do have some WhatsApp messages between the PM/Dyson forwarded to me by the PM.
"I have not found the ones that were leaked to Laura Kuenssberg on my phone nor am I aware of being sent them last year. I was not directly or indirectly a/the source for the BBC/Kuenssberg story on the PM/Dyson texts."
He said he is "happy to meet with the Cabinet Secretary" and to have his phone searched.
On an election campaign visit to Hartlepool, Mr Johnson said: "I think people aren't so much interested in who is briefing who than the substance of the issue at hand - the issue is the ventilators that Dyson was offering to make.
"And let's be absolutely clear, that I think it was right to talk to him and I think it was right to talk to any British manufacturers."
Earlier a Downing Street spokesman refused to confirm 'speculation' that Mr Cummings had leaked the texts, but a Cabinet Office inquiry into the leaks is underway.
Mr Cummings left government in December 2020 after 18 months as the PM's most senior adviser.
He previously ran the Vote Leave campaign, playing a pivotal role in winning the 2016 EU referendum and securing Brexit.
Mr Cummings was an adviser to Michael Gove as Education Secretary during David Cameron's administration. Mr Cameron is said to have branded Mr Cummings a "career psychopath".
Mr Cummings has long been a controversial and aggressive figure in Tory circles. He once described former Conservative cabinet minister David Davis as "thick as mince" and "lazy as a toad".
In his blog post, Mr Cummings also wrote about the renovation of Mr Johnson's Downing Street flat.
He said the PM had "stopped speaking" to him about renovations last year "as I told him I thought his plans to have donors secretly pay for the renovation were unethical, foolish, possibly illegal and almost certainly broke the rules on proper disclosure of political donations if conducted in the way he intended".
"It is sad to see the PM and his office fall so far below the standards of competence and integrity the country deserves," said Mr Cummings.
On Friday the government said the prime minister had met the costs of the refurbishment himself.
An email leaked this week suggested £58,000 of funding for a "Downing Street Trust" had come from a Conservative donor, Lord Brownlow, although no donation has been declared to the Electoral Commission.
In an answer to a House of Lords written question of Friday, Cabinet Office minister Lord True said: "Audited figures of spending from the allowance for the 2020-21 financial year are not yet available; works have taken place by long-standing Downing Street contractors on painting, sanding and floorboards.
"Any costs of wider refurbishment in this year have been met by the prime minister personally."
Lord True added that the government was "considering the merits" of whether works on parts or all of the Downing Street estate could be funded by a trust.
Mr Cummings has also claimed the UK's top civil servant believed that another No 10 adviser, Henry Newman, leaked the news of England's second COVID lockdown last autumn. But Mr Cummings said the PM considered shutting down the government inquiry into that leak because Mr Newman is a close friend of Mr Johnson's fiance Carrie Symonds.
Henry Newman has been contacted for comment.
Mr Cummings quoted the prime minister as telling him: 'If Newman is confirmed as the leaker then I will have to fire him, and this will cause me very serious problems with Carrie as they're best friends … [pause] perhaps we could get the Cabinet Secretary to stop the leak inquiry?"
It is sad to see the PM and his office fall so far below the standards of competence and integrity the country deserves.