UN Secretary General Ban Ki-moon has criticised Israel's blockade of the Gaza Strip during a visit to the Palestinian territory.

Ban said on Tuesday that "the closure of Gaza suffocates its people, stifles its economy and impedes reconstruction efforts.

"It's a collective punishment for which there must be accountability," he added.

He pointed to the electricity shortage in Gaza and the unemployment that hit 50 percent among the coastal enclave's youths.

"We must speak openly about the unacceptable hardships faced by the people of Gaza in light of the humiliation, occupation and siege, as well as the division between the Gaza Strip and the West Bank," Ban said.

After visiting Gaza on his final trip to Palestine before his term of office expires in December, Ban held talks with Israeli Prime Minister Benjamin Netanyahu and Palestinian President Mahmoud Abbas.

READ MORE: UN concerned about 'Israel's excessive use of force'

Speaking alongside Netanyahu at the prime minister's office in Jerusalem, Ban called for efforts to keep alive the possibility of a two-state solution.

"I encourage you to take the courageous steps necessary to prevent a one-state reality or perpetual conflict that is incompatible with realising the national aspirations of the Israelis and Palestinian people," he said.

"We cannot ignore key underlying causes of violence: growing Palestinian anger, the paralysis of the peace process, the near half-century of occupation."

Ban condemned a recent wave of Palestinian knife, gun and car-ramming attacks since October, which he called "terrorism".

Since October 1, Palestinian attackers have killed at least 28 Israelis, mostly in stabbing attacks.

Israeli forces or settlers have killed more than 200 Palestinians, including unarmed demonstrators, bystanders and attackers.