Israeli police detain a Palestinian man after he stabbed a Jewish 16-year-old.Getty Images

JERUSALEM — At least four attacks — three by Palestinians and one by an Israeli — threatened to escalate and spread throughout the country as Israeli police struggled to control spiraling violence.

A 14-year-old Israeli and a police officer were stabbed in separate assaults while four Arabs were stabbed by an Israeli in the southern city of Dimona. In the northern Israeli city of Afula, a Palestinian woman was shot and wounded when she attempted to stab a security guard at a bus station, police said.

The Afula attack came shortly after a Palestinian man attacked a police officer with a knife and tried to grab his gun near the entrance to the Kiryat Arba settlement in the West Bank. The officer was lightly injured and killed his attacker, police said.

Less than an hour earlier, a Palestinian used a vegetable peeler to stab and injure the 14-year-old Israeli in Jerusalem before he was arrested, police said.

Earlier, two members of Israel’s Bedouin minority and two Palestinians were wounded in a stabbing attack by an Israeli man in Dimona, police spokeswoman Luba Samri said. The men were evacuated to a hospital for treatment. Israeli media reported the stabber said after his arrest that he carried out the attacks in retaliation for the numerous Palestinian attacks on Israelis this week.

Dimona mayor Beni Bitton said the stabber is a “mentally ill man.” He told Channel 10 TV that two of the victims worked for City Hall, and that passers-by quickly rushed to help the wounded Arabs and provided first aid.

Prime Minister Benjamin Netanyahu “strongly condemned the harming of innocent Arabs.” He said whoever deploys violence will be brought to justice.

In Jerusalem, Israeli security forces braced for more unrest, barring young Palestinian men from a sacred Jerusalem Old City site in an attempt to restore calm. Samri said men under 45 are barred from the Al-Aqsa mosque compound while women of all ages can enter.

The age limit has been set intermittently in an attempt to ensure peace at the site, as it’s mostly younger Palestinians involved in the violence.

The unrest began about three weeks ago as Palestinians repeatedly barricaded themselves inside the Al-Aqsa mosque and hurled rocks and firebombs at police.

It was fueled by Palestinian allegations that Israel plans to change the delicate arrangement at the hilltop compound, holy to Jews and Muslims. Israel has adamantly denied the allegations and accused Palestinian leaders of incitement.

The attacks were initially confined to east Jerusalem, site of the sacred compound, and the West Bank — both territories captured by Israel from Jordan in the 1967 war and claimed by the Palestinians for their future state. But this past week the violence has spread to Tel Aviv, Afula and other Israeli cities.

What began as Palestinians throwing rocks and firebombs at passing cars and police morphed into a deadly shooting and a rash of knife attacks in which Palestinians stabbed Israeli civilians and soldiers in the streets. Four Palestinians were killed after carrying out attacks against Israelis since Saturday. Three Palestinian protesters were killed in clashes with Israeli forces in the West Bank during that time.

The Red Crescent medical service says more than 500 Palestinians were injured in violent West Bank protests since the weekend, including about 100 from live fire.

The attacks have shocked Israelis and sparked fears of a new Palestinian intifada, or uprising. However, Israeli officials have downplayed that possibility, saying this is the kind of violent spike Israel has faced periodically in recent decades.

Netanyahu has called the attacks a “terror wave.”

Israel has significantly beefed up security in response to the violence in Jerusalem, and on Thursday police set up metal detectors at the entrance to Israel’s Old City.

The hilltop compound is a frequent flashpoint and its fate is a core issue at the heart of the Israeli-Palestinian conflict. It is known to Jews as the Temple Mount, site of the two biblical Jewish temples. Muslims revere it as the Noble Sanctuary, where they believe the Prophet Muhammad ascended to heaven.

Non-Muslim visitors are only allowed to enter the site at specific hours and are banned by police from praying there. Many Muslims view these visits as a provocation and accuse Jewish extremists of plotting to take over the site. Israel has promised to ensure the delicate arrangement at the site and insists it will not allow the status quo there to be changed.

But Palestinians say that in the last two months, there has been a new development in which Israel has intermittently restricted some Muslims from the compound when Jews visit. Israel says this is to reduce friction, but Palestinians claim that Israel intends to establish Muslim-free Jewish visiting hours. The site is so sensitive that even rumors are enough to trigger violence there.