An American teen was among five people killed in a pair of attacks by Palestinians on Thursday — one in Tel Aviv and another in the West Bank — intensifying a two month-long wave of violence, authorities said.

Ezra Schwartz, an 18-year-old man from Sharon, Massachusetts, was among those killed, the Consulate General of Israel to New England told NBC News.

"An 18-year-old American boy studying in Israel before college was murdered today by Palestinian terrorists," the American Jewish Committee (AJC) said in a post on its Facebook page. "May Ezra Schwartz's memory be for a blessing."

Ezra Schwartz, 18, of Sharon, Mass. Facebook

Schwartz was studying in Israel on a gap year between high school and college, according to NBC affiliate NECN.

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 full-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 Thursday, authorities said three people, including Ezra Schwartz, were killed and six wounded in a shooting and vehicle attack in the West Bank.

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 prayed with companions in Tel Aviv.

GALLERY: Violence Rages Between Israelis and Palestinians

"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," 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.

Zaka emergency personnel work at the scene of a Palestinian stabbing attack in Tel Aviv, Israel Nov. 19. NIR ELIAS / Reuters

The building houses stores 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 20s. 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.

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, police said a Palestinian driver sprayed a line of cars stuck in traffic with bullets, killing the American as well as an Israeli and an Arab. The Israeli military said the motorist then "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.