Clashes have erupted between Israeli security forces and Palestinians at the funeral of a 13-year-old boy killed by Israeli gunfire in the occupied West Bank.

Hundreds of Palestinians had gathered to mourn the death of Ali Abu Alia in Almugayer village, where he was hit in the stomach and died in hospital on Friday.

Dozens of people threw stones at Israeli forces and set tyres on fire during the gathering, and soldiers responded with intermittent barrages of tear gas.

Clash near the West Bank town of Salfit
Clash near the West Bank town of Salfit (Majdi Mohammed/AP)

Late on Friday, the senior UN political envoy in the region said he was “appalled” by the killing of the teenager. Israel should “swiftly” and independently “investigate this shocking and unacceptable incident”, Nikolay Mladenov wrote on Twitter.

The Israeli military said “dozens of rioters” hurled rocks at Israeli soldiers and border police, who responded with “riot dispersal means”. It denied that its forces used live ammunition.

Clashes between Palestinian youths and Israeli forces entering Palestinian-controlled areas of the occupied West Bank are common. The military often raids Palestinian towns to arrest people suspected of planning or taking part in attacks.

Tensions are also high around the Israeli settlements. More than 400,000 settlers live in the West Bank, which Israel occupied in the 1967 Middle East war.