HERZLIYA, Israel (AP) — U.N. chief Ban Ki-moon warned Thursday that time is running out for a Mideast peace deal and urged Israel to make goodwill gestures, including easing its blockade of Gaza, to help lure the Palestinians back to negotiations.

Ban attended a security conference in Israel just hours after visiting Gaza, where dozens of Palestinians pelted his armored convoy with shoes and sticks, accusing him of being unfairly biased toward Israel.

Ban met with Israeli Prime Minister Benjamin Netanyahu and Palestinian President Mahmoud Abbas this week to try to salvage low-level talks on borders and security arrangements between Israel and a future Palestinian state.

Israel says it’s ready to continue, but Abbas has said Israel’s proposals were not enough to warrant a further round of meetings. Abbas insists formal negotiations can only resume once Israel freezes settlement building on occupied lands. Netanyahu rejects the idea of a freeze, saying all issues should discussed in negotiations.

In a speech to Israel’s political and security elite late Thursday, Ban warned that Israel must make a return to serious negotiations a top priority. “Time is running out,” he said, adding that Israel will face even more difficult challenges if the current opportunity is not seized.

The Palestinians have complained that Israel wasted time in the low-level talks last month and failed to submit detailed proposals on borders and security, as requested by the Quartet of Mideast mediators, including the UN. In the last meeting of that round, Israel presented general principles for drawing a border.

Ban has urged Israel to submit detailed proposals promptly. The U.N. chief also reiterated that the U.N. considers Israeli settlements illegal under international law. Some 500,000 Israelis live in the West Bank and east Jerusalem, territories Israel captured in the 1967 Mideast war, along with Gaza.

Ban said both sides should make goodwill gestures, asking Israel to open Gaza for construction materials. He appealed to Hamas to stop attacks on Israel from Gaza.

Ban’s visit to Gaza was meant to draw attention to humanitarian issues in the crowded seaside strip.

As he crossed into Gaza, about 40 relatives of Palestinian prisoners held in Israeli jails hoisted posters with pictures of their loved ones and signs in English and Arabic reading, “Ban Ki-moon, enough bias to Israel.”

Some swung their signs and wooden sticks at the armored convoy. Three people threw slippers at his car and another hurled a boot — an insulting gesture in Arab culture.

The prisoners’ relatives, angry that Ban would not be meeting with them, formed a human chain at the crossing in an effort to block his vehicle, but Hamas security forces moved them away so Ban could enter.

Israel holds about 7,000 Palestinian prisoners, after recently freeing more than 1,000 in exchange for a captive Israeli soldier. Some of those still in prison were sentenced for attacks that killed dozens of Israelis.

Palestinian demonstrators use sticks to hit one of the vehicles in the convoy of U.N. Secretary-General Ban Ki-moon as it enters the Erez border crossing between Israel and Gaza (photo credit: AP/Hatem Moussa)

Palestinian demonstrators use sticks to hit one of the vehicles in the convoy of U.N. Secretary-General Ban Ki-moon as it enters the Erez border crossing between Israel and Gaza (photo credit: AP/Hatem Moussa)

Ban did not meet with Hamas, which is considered a terrorist group by Israel and the West and whose government is not internationally recognized. Instead, he met with U.N. relief officials, aid groups and human rights organizations.

Speaking to reporters at a U.N. housing project, Ban thanked the people of Gaza for their “warm welcome” and tried to play down the border incident.

“There is a very dire social, economic and humanitarian problem. People need to move freely,” he said. “I have urged the Israeli authorities to lift the restrictions completely and unconditionally.”

Ban called on Hamas to end attacks on Israel.

A barrage of mortar shells fell in southern Israel late Wednesday, ahead of Ban’s arrival. The shells exploded in open fields without causing casualties.

“All this violence must stop,” he said in Gaza. “I would urge the Palestinians from Gaza: they must stop firing rockets on the Israeli side … this killing of civilians is not acceptable.”

From Gaza, the U.N. chief re-entered Israel to visit the border town of Sderot, which has repeatedly been pounded over the years by Palestinian rocket and mortar fire.

“Nothing justifies shooting of rockets and mortars into Israel. It is completely unacceptable to target and terrorize citizens on a daily basis,” he said in Sderot.

Copyright 2012 The Associated Press.