Protesters threw shoes at UN chief Ban Ki-moon as he entered Gaza on Thursday, condemning Israel's blockade and Ban's refusal to meet the families of Palestinian prisoners.
Ban's convoy came under assault from about 50 protesters as it crossed into the Hamas-controlled Palestinian territory only hours after eight rockets were fired into southern Israel from Gaza.
The protesters threw sand and stones, or tried to hit the cars with chairs and blocks of wood. They toted pictures of Palestinians imprisoned by Israel and placards reading "Ban Ki-moon enough bias for Israel."
More demonstrations awaited Ban, on his third visit to Gaza since Israel's three week war with Hamas in early 2008.
At a UN-run housing project in the Khan Younis district, about 25 youths shouted slogans and held banners saying "We demand a trial for Israel's leaders."
Local civil groups and businessmen boycotted a planned lunch with the UN leader because relatives of some of the 5,000 Palestinians in Israeli jails were not allowed to attend.
A statement signed by Gaza rights activists and businessmen said they had "received an unjustified negative response" that Ban would not meet the relatives.
The group noted how he had met with the family of an Israeli soldier who was captured by Gaza militants in 2006 and held incommunicado for five years. The Palestinian Liberation Organization apologised for the protests however.
Ban later said he had been warned in advance there would be demonstrators. "I try to understand their concerns. I know that many people in Gaza are frustrated. It is understandable and natural," he told reporters travelling with him.
He also released a statement saying he was "concerned about the situation of Palestinian prisoners in Israeli jails" and had raised conditions with Israel's prisons minister.
Ban discussed Gaza with Israel's Defence Minister Ehud Barak at a dinner before leaving Israel, a UN spokesman said. Ban "urged the defence minister to take further steps to improve conditions in Gaza."
Signup to our newsletter and follow us on Facebook and Twitter!
Israel limits imports and exports from the territory, citing security concerns and the need to deny access to weapons and money to Hamas, which it considers a terrorist organisation.
But much of the international community, including the United Nations, believes the restrictions unfairly harm the 450,000 population.
"Israel has taken some measures to ease the closure. More must be done," Ban told Palestinians in Khan Younis.
"I am pressing hard for policy changes so that the United Nations can do its essential work," he added, calling for Gaza to be able to trade "without restrictions."
Balancing his comments, Ban also condemned the firing of rockets into Israel which he called "unacceptable".
"People from Gaza must stop firing rockets onto the Israeli side," he told the news conference in Khan Yunis. Back in Israel, he visited a school near the Gaza frontier where one student was killed by a rocket in 2008.
Ban's noisy trip to Gaza was part of a tour of Israel and the Palestinian territories intended to convince the two sides to hold new meetings on ways to kick-start direct negotiations. He also went to Jordan which has hosted five unofficial meetings in recent weeks.
The UN leader warned that time is running out for a peace settlement in a speech to a security conference at Herzliya, near Tel Aviv.
"Negotiations will go nowhere without a shared sense of urgency and a genuine determination to succeed," he told an audience which included Barak and top officials and academics.
"The Palestinians must engage, seriously, on security. Israel must engage, seriously, on territory."
With the Jordan contacts showing no signs of ending the freeze on full negotiations since September 2010, Ban has this week urged Israel to make "goodwill gestures" to tempt the Palestinians back to talks.
Amid reports that the international community wants Israel to take confidence-building measures, US envoy to the Middle East, David Hale, held talks with Palestinian president Mahmud Abbas on Thursay. No details of their discussions were released.