Two attacks by Palestinians, including a stabbing at an office building in Tel Aviv, have killed five people, intensifying a two month-long wave of violence.

Much of the recent unrest has focused on the West Bank city of Hebron, a frequent flashpoint.

But the attack in Israel's economic hub of Tel Aviv returned the violence to the Israeli heartland, shattering a lull that had set in outside of the West Bank and stoking Israeli fears that a fully fledged Palestinian uprising could erupt.

Israel has beefed up security across the country in recent weeks in light of the attacks, sending soldiers to patrol cities alongside thousands of police. It has set up checkpoints and concrete barriers in Arab areas of east Jerusalem, where many of the attackers have come from. Still, authorities have failed to halt the seemingly spontaneous attacks.

A knife-wielding Palestinian man fatally stabbed two Israeli men in a southern Tel Aviv office building before being apprehended, police and witnesses said.

Later authorities said three people, including one Israeli, were killed and six wounded in a shooting and vehicle attack in the West Bank. The identities of the remaining victims were not immediately clear.

Police said the stabbing took place in a shop on the second floor of an expansive office building where a group of Israelis had gathered to hold afternoon prayers.

Shimon Vaknin, a witness, told reporters that a bloodied man stumbled into the room where he was praying with companions in Tel Aviv.

"He was stabbed outside, he was all slashed and bloody. We were in shock. We didn't know what happened and then someone near the door shouted there's a terrorist," Mr Vaknin said. He described a dramatic standoff, with the worshippers standing against the closed shop door as the assailant tried to force his way in.

The building houses shops and offices and had been cordoned off by police after the attack. Israeli media showed footage of a blood-spattered floor littered with plastic gloves.

Police spokeswoman Luba Samri said one of the dead was in his twenties. Details about the second victim's identity were not immediately known, but he died of his wounds in hospital, she said. A third Israeli was moderately wounded.

Ms Samri said the attacker was apprehended by civilians and identified him as Raed Khalil bin Mahmoud, a 36-year-old Palestinian father of five from the West Bank village of Dura, near Hebron.

It was not immediately clear what he was doing in Tel Aviv, although many Palestinians are granted permits to work in Israel. Israeli Channel 2 TV said the man worked illegally at a nearby restaurant.

In the West Bank attack, Ms Samri said the shooter opened fire on an Israeli car from his vehicle. The Israeli military said the vehicle fled the scene and "intentionally" rammed his vehicle into a group of pedestrians. The military said forces at the scene shot at the attacker, "identifying a hit", although the attacker's condition was not known. The attack took place in Gush Etzion, an area south of Jerusalem.

Thursday's violence brings the number of Israelis killed in the wave of violence to 17. At least 82 Palestinians have been killed by Israeli fire, 52 of them said by Israel to be attackers, the remainder killed in clashes with Israeli troops.

Although Tel Aviv and its surrounding suburbs have seen a number of attacks during the latest wave of violence, much of the recent unrest has been concentrated around Hebron, a city where several hundred Jewish settlers live in heavily guarded enclaves among thousands of Palestinians. Near the city last week, two Israelis, a father and son, were killed in their car on their way to dinner.

The violence erupted in mid-September over tensions surrounding a Jerusalem holy site and quickly spread further into Israel, the West Bank and the Gaza Strip.

The attacks have Israelis on edge. Several politicians have urged licensed gun owners to carry their weapons and there have been several bloody accidents. In one case, an Israeli man stabbed a fellow Jew, thinking his victim was an Arab because of his dark skin, and a security guard shot an Eritrean migrant he thought was an attacker during a bus station shooting last month.

The Palestinians say the violence is rooted in frustration at decades of living under Israeli occupation, while Israel accuses Palestinian leaders of inciting the unrest. This week Israel outlawed an Islamic party, accusing it of fanning the flames and inciting Arab citizens of Israel to violence.

Israeli police said a Jerusalem court sentenced a police officer to six weeks' community service for beating a Palestinian-American teenager during a violent protest in July 2014.

Fifteen-year-old Tariq Abu Khdeir, of Tampa, Florida, was beaten at an east Jerusalem protest following the murder of his cousin. Israeli extremists burned 16-year-old Mohammed alive in revenge for the killings of three Israeli teenagers in the West Bank.

Abu Khdeir's lawyer Mohammad Mahmoud said the ruling delivered an "extremely light" punishment that "gives (police) a free hand".

Sign up to our free newsletters

Get the best updates straight to your inbox:
Please select at least one mailing list.

You can unsubscribe at any time by clicking the link in the footer of our emails. We use Mailchimp as our marketing platform. By subscribing, you acknowledge that your information will be transferred to Mailchimp for processing.