Violent protests have broken out in Nablus, the West Bank's second largest city, after a Palestinian prisoner was allegedly beaten to death while in Palestinian police custody.

Hundreds of people marched through the city on Tuesday, some reportedly throwing stones, to condemn the death of Ahmed Izz Halawa, after he was seized by Palestinian security forces during a police raid.

The raid followed the death of two police officers who were shot as they targeted a criminal group suspected of harbouring weapons last week. Two suspects were also killed, one of whom was related to Halawa.

Halawa, who was a senior member of the Al Aqsa Martyrs' Brigade - a militant group linked to the Fatah party - was accused of "masterminding" the shooting of the officers, the governor of Nablus, Akram al-Rjoub, said.

Security forces detained Halawa during a "complicated and delicate security operation in Nablus," Adnan Al Dmairi, the spokesman for the Palestinian Authority's security services, said in a statement.

Halawa was killed on Tuesday after being taken into Juneid prison in Nablus, Mr Dmairi added. However, the exact circumstances surrounding his death remain unclear.

Mr Rjoub said Halawa was beaten to death by members of security forces. Mr Dmairi added that senior officers had attempted to stop lower-ranker officers from attacking Halawa, Middle Eastern Eye reports.

"[Halawa] started to shout and swear at the security officers who started to attack him," said Mr Dmairi.

Palestinian Prime Minister Rami al-Hamdallah has promised a full investigation into the death, describing the incident as "rare".

Halawa's family have lambasted the killing, describing him as "a noble national leader who was killed in cold blood without the least observance for human rights," the Times of Israel reports, citing local newspaper al-Quds' website.

People protesting the death on Tuesday were dispersed with tear gas and chased down by Palestinian Authority security forces, the Times of Israel reports.

Those marching were calling for the Prime Minister, Mr Rjoub and Palestinian security head Nidal Abu Dukhan to resign, according to the Palestinian news site Safa.

Videos uploaded to social media showed large crowds marching and running through the streets.

The Palestinian Authority is responsible for security and policing inside Palestinian cities, while Israeli security forces retain full control over around 60 per cent of the West Bank, all of which the Palestinians seek for an independent state, alongside East Jerusalem and Gaza.