Suella Braverman has launched a full-scale attack on her old boss Rishi Sunak, a day after he sacked her as home secretary.
In a blistering letter to the prime minister, she said he had repeatedly failed on key policies and broken pledges over immigration.
Mr Sunak had adopted "wishful thinking" to "avoid having to make hard choices", she wrote.
Her broadside comes on the eve of a key ruling on the government's Rwanda plan.
On Wednesday morning, the UK Supreme Court will deliver its verdict on the lawfulness of the postponed scheme to send some asylum seekers to Rwanda to claim asylum there.
The ruling on the flagship policy will be a key moment for Mr Sunak's government, and could reignite divisions among Tory MPs over the ECHR human rights treaty.
Mrs Braverman, a leading figure on the right of the party, has previously described delivering the Rwanda plan as her "dream" and "obsession".
In her letter, the former home secretary claimed she struck a secret deal to serve in Mr Sunak's cabinet in exchange for a series of commitmentsin key areas, after Liz Truss's premiership imploded last year.
Her support, she added, had been a "pivotal factor" in allowing Mr Sunak to win the support of Tory MPs and enter No 10.
She added that she had argued within government for curbs on human rights law to ensure the Rwanda policy was not derailed by legal challenges.
But compromises from Mr Sunak during the passage of the Illegal Migration Act, she wrote, had left the policy "vulnerable" to legal challenges under the European Convention of Human Rights, even if the Supreme Court declares it lawful.
If the ruling goes against the government, she added, he would have "wasted a year" on the flagship law to stop small boat crossings, "only to arrive back at square one".
"Worse than this, your magical thinking - believing that you can will your way through this without upsetting polite opinion - has meant you have failed to prepare any sort of credible Plan B," she wrote.
A No 10 spokesman thanked Mrs Braverman for her service, but added: "The prime minister was proud to appoint a strong, united team yesterday focused on delivering for the British people."
He said the government had "brought forward the toughest legislation to tackle illegal migration this country has seen and has subsequently reduced the number of boat crossings by a third this year".
And whatever the outcome of the Supreme Court tomorrow, the prime minister "will continue that work," he said.
'Plan not working'
In her letter, the former home secretary told Mr Sunak he had "manifestly and repeatedly" failed to deliver on policy priorities.
"Either your distinctive style of government means you are incapable of doing so," she wrote.
"Or, as I must surely conclude now, you never had any intention of keeping your promises."
She added: "Someone needs to be honest: your plan is not working, we have endured record election defeats, your resets have failed and we are running out of time. You need to change course urgently."
Mrs Braverman was sacked from her role on Monday, after opponents accused her of stoking tensions ahead of pro-Palestinian marches in London.
She lost her job days after she claimed police had applied a "double standard" to protesters, in an article for the Times newspaper.
Mrs Braverman said Mr Sunak had failed "to rise to the challenge posed by the increasingly vicious antisemitism and extremism displayed on our streets".
"I have become hoarse urging you to consider legislation to ban the hate marches and help stem the rising tide of racism, intimidation and terrorist glorification threatening community cohesion," she added, accusing the PM of putting off "tough decisions in order to minimise political risk to yourself".
In her letter, Mrs Braverman said the conditions under which she agreed to become home secretary in October 2022 were set out in a "document with clear terms".
Sources close to Mrs Braverman claim Mr Sunak read and agreed the document the letter refers to, which had been drawn up by Mrs Braverman.
They say he took a copy and there were witnesses.
Mrs Braverman said the agreement included "firm assurances" on cutting legal migration, inserting measures to override the European Convention on Human Rights (ECHR) into legislation to stop small boat crossings, delivering key Brexit legislation and issuing "unequivocal" guidance to schools on protecting biological sex and safeguarding single-sex spaces.
She accused Mr Sunak of "a betrayal of our agreement" and "a betrayal of your promise to the nation that you would do 'whatever it takes' to stop the boats".
Labour shadow minister Lisa Nandy said the letter was "just the latest instalment in a Tory psychodrama that's been playing out over the last 13 years, holding the rest of the country to ransom while the Tories fight among themselves".