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 thanked her for her “excellent work”, adding that he wanted an “unconditional ceasefire” in Gaza.
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”.
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.”
A Downing Street spokesman said: “The PM regrets that Baroness Warsi has decided to stand down and is grateful for the excellent work that she has done both as a minister and in opposition.
“Our policy has always been consistently clear – the situation in Gaza is intolerable and we’ve urged both sides to agree to an immediate and unconditional ceasefire.”
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.”
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.
She has made it clear that her Muslim faith and her personal beliefs must come before her political beliefs and career.
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.
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. Mr Cameron, who is on holiday, has yet to respond.
For Labour, shadow foreign secretary Douglas Alexander said most “reasonably minded people across Britain will agree with the sentiments expressed” by Lady Warsi, adding: “It is a sad reflection of the prime minister’s misjudgement of the crisis in Gaza that this capable minister has felt the need to leave the government.”
Israel launched Operation Protective Edge on 8 July with the stated aim of ending rocket attacks and destroying tunnels used by Palestinian militants.
Lady Warsi has called on Twitter for more international action to end the crisis. On 21 July, she wrote: “The killing of innocent civilians must stop. Need immediate ceasefire in #Gaza. Leadership required on both sides to stop this suffering.”
Three days later she added: “Can people stop trying to justify the killing of children. Whatever our politics there can never be justification, surely only regret #Gaza.”
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, later working for the Crown Prosecution Service before setting up her own legal practice.