Palestinian officials have condemned the US decision to end all funding to the UN's Palestinian refugee agency.

The US has been the largest donor to the United Nations Relief and Works Agency (Unrwa) - but now says the organisation is "irredeemably flawed".

Palestinian President Mahmoud Abbas's spokesman has called the move a "flagrant assault against the Palestinian people".

However, an Israeli official told AFP: "Israel supports the US move".

Unrwa says it currently supports more than five million Palestinians in Gaza, the West Bank, Jordan, Syria and Lebanon, including providing health care, education and social services.

What did the US do?
The US has been the largest single donor to Unrwa, providing $368m (£284m) in 2016 and funding almost 30% of its operations in the region.

But in January, the administration of President Donald Trump withheld more than half of its planned funding to Unrwa, saying it would keep back $65m unless the body carried out "reforms".

On Friday, the US state department said in a statement that "the US will no longer commit further funding to this irredeemably flawed operation".

Why did the US cut funding?
The state department said the US had shouldered a "very disproportionate share of the burden of Unrwa's costs", and that the international community should contribute more.

It has also said it is unhappy that Unrwa has kept expanding the number of people eligible for assistance, and says its business model is "simply unsustainable and has been in crisis mode for many years".

This links to a wider disagreement over which Palestinians are refugees with a right to return to the homes they fled following the 1948 Arab-Israeli war.

The UN says there are about five million Palestinian refugees, including the descendants of people who fled the 1948 war.

However, the US and Israel disagree with how this number is calculated, and say the number of Palestinian refugees should be much smaller.

President Trump also appears unhappy with how US aid to the region has been received.

He has previously tweeted that the US has not received "appreciation or respect" for the aid it has provided, and that the Palestinians are unwilling to negotiate with Israel.

US ambassador to the UN, Nikki Haley, said earlier this week: "There's an endless number of refugees that continue to get assistance, but more importantly, the Palestinians continue to bash America."

The state department says it remains "deeply concerned regarding the impact upon innocent Palestinians, especially school children, of the failure of Unrwa".

What has the reaction been?
The organisation's chief spokesperson, Chris Gunness, told the BBC the impact of the US move would be devastating.

"It's likely to be widespread, profound, dramatic and unpredictable because, let's make no mistake, some of the most marginalised and fragile and vulnerable communities in the Middle East are going to likely suffer because of this."

Mr Gunness says 526,000 schoolchildren receive a Unrwa education every day, while it also assists "1.7 million food insecure people".

"We do assistance to disabled refugees, to women, to vulnerable children. The list goes on and, as I say, the impact on them is likely to be utterly devastating."

Germany's foreign ministry has said it will increase contributions to Unrwa to try to maintain stability.

Palestinian officials have condemned the US move.

A spokesman for President Abbas told Reuters the decision was in "defiance of UN resolutions", and would not change the fact that the US "no longer has a role in the region" and "is not a part of the solution".

The Palestinian Liberation Organization said a statement that the cut was "a cruel and irresponsible move targeting the most vulnerable segment of Palestinian society".

The Palestinian militant group Hamas told Reuters that the move was a "grave escalation against the Palestinian people".

Palestinian officials have already accused the US of pro-Israel bias, especially after Mr Trump recognised Jerusalem as Israel's capital and opened a US embassy in Jerusalem, despite the city being claimed by both sides.

The move overturned decades of US neutrality on the issue and attracted international criticism.

What is Israel's position?
Israeli Prime Minister Benjamin Netanyahu has previously called for Unrwa's funding to be cut gradually and its responsibilities transferred to the UN's global refugee agency, the UNHCR, arguing that it "perpetuates the Palestinian problem".

On Saturday, an official in Mr Netanyahu's office told AFP that "Israel supports the US move", adding: "Consolidating the refugee status of Palestinians is one of the problems that perpetuates the conflict."

However, some Israelis have previously raised concerns that weakening Unrwa could cause regional instability and create more extremism in the region.