Foreign Office minister Baroness Warsi has resigned from the government, saying its policy on the crisis in Gaza is “morally indefensible”.
She wrote on her Twitter feed that she was leaving with “deep regret”.
Lady Warsi, who was previously chairman of the Conservative Party, became the first female Muslim cabinet minister when David Cameron took office in 2010. The prime minister said he “regretted” that she had not discussed her decision to quit with him before announcing it.
Labour backed Lady Warsi’s comments, but Chancellor George Osborne called her resignation “disappointing and frankly unnecessary”.
Lady Warsi grew up in Dewsbury, West Yorkshire, and worked as a solicitor before entering politics. She was demoted from the cabinet to a middle-ranking Foreign Office post in 2012, being made minister for faith and communities at the same time.
She wrote on Twitter on Tuesday: “With deep regret I have this morning written to the Prime Minister & tendered my resignation. I can no longer support Govt policy on #Gaza.”
Several backbench Conservative MPs have called on Mr Cameron to take a more robust line with Israel amid concerns its actions in Gaza are “disproportionate”.
Lady Warsi’s resignation letter says government policy is “morally indefensible, is not in Britain’s national interest and will have a long term effect on our reputation internationally and domestically”.
She adds that the decision “has not been easy” but there is “great unease” within the Foreign Office over “the way recent decisions are being made”.
Analysis By BBC Political Correspondent Robin Brant
Baroness Warsi has chosen a day when the prime minister is away to hand in her resignation. She is the first minister in four years of coalition government to resign over a matter of policy.
She clearly believes – as probably the most prominent British Muslim politician in the country – that she can no longer stand by a prime minister and a government that she feels is using a “morally indefensible” policy when it comes to Israel and the ongoing conflict in Gaza.
The Conservatives, traditionally, have close ties to the Israeli government and it is far more difficult for David Cameron and those at the top of his party to speak out more strongly about Israel than others, who have a different policy.
Lady Warsi goes on to say that “I must be able to live with myself for the decisions I took or the decisions I supported. By staying in government at this time I do not feel that I can be sure of that.”
Mr Cameron’s letter of reply says he is “sorry” she has resigned, adding: “I realise that this must not have been an easy decision for you to make and very much regret that we were not able to speak about your decision beforehand.”
It continues: “I understand your strength of feeling on the current crisis in the Middle East – the situation in Gaza is intolerable.” But he says: “Our policy has always been consistently clear: we support a negotiated two state solution as the only way to resolve this conflict once and for all and to allow Israelis and Palestinians to live safely in peace.”
London Mayor Boris Johnson, a fellow Conservative, told LBC Radio he had “great respect” for Lady Warsi, adding: “She has done a great job for us and I hope she will be back as soon as possible.”
Liberal Democrat Deputy Prime Minister Nick Clegg said it was no “secret” that there were different opinions over Gaza within the government and that Lady Warsi had “strong views” on the subject.
Labour leader Ed Miliband told the BBC: “The government’s position is wrong and I think Sayeeda Warsi’s statement is completely right about this.” He said that Mr Cameron had to “think much more clearly” about policy on Gaza and had to “break his silence” over Israel’s actions.
Israel launched Operation Protective Edge on 8 July with the stated aim of ending rocket attacks and destroying tunnels used by Palestinian militants.
Gaza officials say the four-week conflict has killed 1,800 Palestinians. Some 67 Israelis have also died.
On Monday the prime minister said United Nations Secretary General Ban Ki-moon had been right to speak out against an Israeli attack near a UN-run school in Gaza. But he would not say if he agreed that it had been “a moral outrage and a criminal act”.
He said: “Hamas displays no regard for human life and must cease firing rockets into Israel and digging tunnels to facilitate the murder of civilians. But sustainable security for Israel cannot be achieved simply by permanent blockade, aerial bombardment and periodic ground incursion.”
One of five daughters of Pakistani immigrants, Lady Warsi studied law at Leeds University, working for the Crown Prosecution Service before setting up her own legal practice.