Israel has reacted angrily to comments made by the UN secretary general about the Gaza war at the Security Council.
António Guterres said he condemned unequivocally the deadly attacks by Hamas gunmen in Israel two weeks ago but that it was important to recognise that they "did not happen in a vacuum".
Israeli ambassador Gilad Erdan accused him of "justifying terrorism" and demanded his immediate resignation.
He later said Israel would withhold visas from UN officials.
Foreign Minister Eli Cohen meanwhile dismissed calls for a ceasefire and proportionality in his country's response to the Hamas attacks, in which at least 1,400 people were killed and 222 taken as hostages.
The Hamas-run health ministry in Gaza says more than 6,500 people have been killed in the territory since Israel retaliated with air and artillery strikes while massing troops for an expected ground invasion.
Addressing a meeting of the UN Security Council in New York on Tuesday, Mr Guterres said the situation in the Middle East was growing more dire by the hour and urged all parties to respect and protect civilians.
"I have condemned unequivocally the horrifying and unprecedented 7 October acts of terror by Hamas in Israel. Nothing can justify the deliberate killing, injuring and kidnapping of civilians - or the launching of rockets against civilian targets."
He then told the council that it was "important to also recognise the attacks by Hamas did not happen in a vacuum", adding: "The Palestinian people have been subjected to 56 years of suffocating occupation."
He described how Palestinians had "seen their land steadily devoured by settlements and plagued by violence; their economy stifled; their people displaced and their homes demolished".
Mr Guterres also said he was deeply concerned about "the clear violations of international humanitarian law that we are witnessing in Gaza".
He expressed alarm at Israel's continuous bombardment of Gaza, as well as the level of civilian casualties and "wholesale destruction of neighbourhoods".
Without naming Hamas, he stressed that "protecting civilians can never mean using them as human shields".
And without naming Israel, he said: "Protecting civilians does not mean ordering more than one million people to evacuate to the south, where there is no shelter, no food, no water, no medicine and no fuel, and then continuing to bomb the south itself."
The UN chief also appealed for a humanitarian ceasefire to make the delivery of aid to Gaza easier and safer, and to facilitate the release of the hostages.
He called the crossing from Egypt of 62 lorries carrying food, water and medical supplies since Saturday "a drop of aid in an ocean of need", and warned that the failure to include fuel risked a disaster.
The UN agency for Palestinian refugees, Unrwa, has said that without fuel deliveries it will not be able to provide support for the 600,000 people sheltering in its facilities beyond Wednesday.
Without fuel, hospitals will not have power and drinking water will not be purified or pumped.
The foreign minister of the West Bank-based Palestinian Authority, Riyad al-Maliki, demanded an end to what he called the "ongoing massacres being deliberately and systematically and savagely perpetrated by Israel" against the two million people living in Gaza.
The Israeli foreign minister criticised Mr Guterres in his own speech to the Security Council, asking him: "In what world do you live?"
Mr Cohen said the killing of 1,400 men, women and children by the 1,500 Hamas gunmen who infiltrated Israel constituted a massacre that would "go down in history as more brutal" than those committed by the Islamic State (IS) group.
"Hamas are the new Nazis," Mr Cohen declared. "Just as the civilised world united to defeat the Nazis, just as the civilised world united to defeat [IS], the civilised world has to stand united behind Israel to defeat Hamas."
Addressing the UN's appeals for proportionality and a ceasefire, he said: "Tell me, what is a proportionate response for killing of babies, for rape [of] women and burn them, for beheading a child? How can you agree to a ceasefire with someone who swore to kill and destroy your own existence?"
Mr Cohen later wrote on X, formerly known as Twitter: "I will not meet with the UN secretary general. After the October 7th massacre, there is no place for a balanced approach."
Israel's ambassador to the UN said Mr Guterres had proved he was "completely disconnected from the reality in our region".
"His statement that, 'the attacks by Hamas did not happen in a vacuum,' expressed an understanding for terrorism and murder. It's really unfathomable. It's truly sad that the head of an organisation that arose after the Holocaust holds such horrible views. A tragedy!" Gilad Erdan said.
On Tuesday, Mr Erdan was also quoted by Israeli news website Ynet as saying he had informed the UN's Under-Secretary General for Humanitarian Affairs, Martin Griffiths, that his request for an Israeli visa had been refused.
"He will not be able to come here to the region. Their agencies constantly need to bring in new people, certainly at a time like now. They will be refused."
UK government minister Robert Jenrick said the UN chief was "wrong" and should retract his comments.