There are two aspects to the Baroness Warsi resignation: the Westminster politics and the Middle East issue. But at the heart of both is the rightward drift of the Tory party.

Her resignation letter is a political grenade lobbed under the prime minister's desk while he's on holiday. She explicitly criticises his reshuffle of last month, where the government shifted decisively to the right. She singles out the Home Office and the new leadership of the Foreign Office for weakness and short-sightedness during the Gaza crisis.

Warsi praises former foreign secretary William Hague and then sticks the knife in his successor, Phillip Hammond, who clearly does not have her support. She highlights that there is "great unease across the Foreign Office, amongst both ministers and senior officials, in the way recent decisions are being made".

On home affairs, she laments the sacking of Ken Clarke and Dominic Grieve, the two most moderate senior members of the government who were cut off so more die-hard right-wingers could be brought into government. She says:

"In many ways the absence of the experience and expertise of colleagues like Ken Clarke and Dominic Grieves has over the last few weeks become very apparent."

She ends the letter with this thinly-veiled threat:

"You will continue to have my personal support as leader of the Conservative party as you continue to ensure that our party evolves to meet the challenges we face in Britain today and ensure that the party is relevant and responsive to all communities that make up today’s Britain."

The message for Cameron is clear. He is losing the support of ethnic minorities and moderates.

Presumably Warsi had in mind the image of Cameron in the home of an alleged undocumented immigrant last week, surrounded by immigration enforcement officers, in a photo opportunity designed to appeal to Ukip voters. Or perhaps she was thinking of the 'Go Home' vans, or the constant drip-feed of harsh anti-immigrant rhetoric coming from Downing Street and the Home Office.

When she directly addresses the Gaza crisis as an issue, she focuses on how counter-productive Britain's response is.

The current conflict could become the basis for "radicalisation", she argues, and may have "consequences for us for years to come".

This is an interesting and under-reported aspect of the conflict. While much ink is spilled assessing the radicalisation of British Muslims who go to Syria to fight, none is dedicated to the effect on British Muslims of the prime minister's refusal to condemn the killing of children in Gaza.

If such activities were committed by Britain's enemies, they would be condemned in the strongest possible terms. The fact that language is much more restrained in the case of Britain's allies will prove to many young Muslims how hopelessly hypocritical and uncaring the country is in its foreign affairs.

In an interview with the Huffington Post, Warsi then highlights many of the counter-productive injustices the UK has perpetuated in the Middle East because of its blind support for Israel.

She singles out our pressure on the Palestinians not to turn to the International Criminal Court (ICC) to seek justice.

"As the minister for the International Criminal Court, I’ve spent the last two and a half years helping to promote, support and fund the ICC. I felt I could not reconcile this with our continued pressure on the Palestinian leadership not to turn to the ICC to seek justice."

She also criticises the British government's failure to support Palestine's bid for statehood at the UN.

"Our position not to recognize Palestinian statehood at the UN in November 2012 placed us on the wrong side of history and is something I deeply regret not speaking out against at the time."

Finally, she attacks the government for continuing to sell weapons to Israel given the way that it uses them.

"It appals me that the British government continues to allow the sale of weapons to a country, Israel, that has killed almost 2,000 people, including hundreds of kids, in the past four weeks alone. The arms exports to Israel must stop."

All these points chime with Cameron circa-2006, when he criticised the Israeli invasion of Lebanon as disproportionate and urged Tony Blair to do the same.

It’s worth rereading what he told the BBC at the time:

"I don't think it should be seen as an unfair criticism of Israel. It is just a statement of the fact. Britain is a friend of Israel, yes, and a friend of the US, but in both cases, we should be candid friends and we shouldn't be scared of saying to our friends when we think they are making mistakes or doing the wrong thing."

This moderate approach has been lost since Cameron came to power. The idea Britain could be a critical friend of Israel, always supporting its right to exist but also pushing for the creation of a Palestinian state, has been lost. After all, who can blame Palestinians for increasingly embracing violence if the legitimate routes to recognition are closed off to them?

Since he made that sensible statement in 2006 Cameron has drifted to the neo-con right on international affairs, albeit in a less defining manner than Blair. He came to power criticising the Israeli occupation. Not so long ago, Hague issued harsh words against Israel when nine activists on a Turkish aid ship were killed.

Since then Britain has adopted a more pliant attitude towards Israel, in line with American expectations. The resignation of Hague and his replacement with the tepid Hammond has not helped matters. Hammond has failed to make any impact during the Gazan crisis – even in the British press. He tried to lightly suggest Israel was damaging its reputation during a joint press conference with the Israeli prime minister, but his efforts were so weak Benjamin Netanyahu ended up praising him for his "moral clarity".

Warsi's resignation is a sign of how uncomfortable the remaining moderate elements in the Tory party feel at its relentless rightward drift – on foreign policy, on immigration and on Europe. In many ways it is the full stop of last month's reshuffle: a resignation over the terms upon which it was conducted.