A Palestinian terrorist wearing a roughly-made suicide vest attacked Israeli border police in the West Bank on Friday before being shot as he attempted to detonate his device.

The clash occured near a military checkpoint outside the township of Ramallah.

Police spokesman Micky Rosenfeld said in a statement the assailant stabbed an officer twice before being shot and an investigation has now been launched into the attack and ” reports that the suspect had an explosive device on him or a fake explosive device.”

The assailant, identified by a medical source as a 24-year-old from Hebron in the southern West Bank, was taken to hospital by Palestinian medics. He was in a critical condition, the source said.

Elsewhere, the Israeli military said that about 2,500 Palestinians took part in riots in the West Bank, rolling flaming tyres and throwing firebombs and rocks at soldiers and border police. Troops took action to break up the riots, it said in a statement.

Similar scenes occurred along the border with Gaza Strip, where about 3,500 Palestinians demonstrated.

“During the violent riots IDF soldiers fired selectively towards main instigators,” the military said.

AFP contributed to this report