Tel Aviv: A knife-wielding Palestinian attacked passengers on a morning rush-hour bus in Tel Aviv on Wednesday, wounding 12 people, before being shot by a passing prison officer in the latest lone-wolf attack.

It was the first attack in Tel Aviv since a fatal November stabbing of a soldier by a Palestinian, and roundly condemned by Britain, France and the United States.

The attacker struck in the heart of Israel`s commercial capital, police spokeswoman Luba Samri said, describing him as a "terrorist."

Twelve people were wounded, including three in serious condition, four in moderate condition and five who sustained light injuries, hospital sources said.

Another seven people were treated for shock.

"The terrorist stabbed the bus driver several times but the driver fought back until he fled on foot and was neutralised by a guard from the prisons` service," a police statement said.

He was shot in the leg then taken to hospital.

Witnesses told army radio the driver apparently used pepper spray or tear gas to try to stop the attack.

Brief footage from the scene broadcast on television showed people fleeing a man who rams a knife into the back of a woman, then runs on when she collapses.

Police identified the attacker as 23-year-old Hamza Matruk from Tulkarem refugee camp in the northern West Bank, who was staying in Israel illegally.

During his interrogation, Matruk gave several reasons for carrying out the attack: Israel`s war with Hamas in the Gaza Strip last summer, the wave of unrest in and around Jerusalem`s flashpoint Al-Aqsa mosque compound as well as Islamist material he had seen, police said.

Matruk told investigators he perpetrated the attack in order to "reach heaven," according to police.Speaking to army radio, the prisons service officer described how the incident played out.

"We saw the bus swerve to the side... then stop at a green light," he said.

"Suddenly, we saw people running out of the bus, and when we saw them shouting for help, we jumped out (of our vehicle) and I and three others started running after the terrorist. At first we fired in the air, then at his legs.

"The terrorist fell, we handcuffed him and turned him over to police."

There was no claim of responsibility, but the attack was praised by the Islamist movement Hamas.

A senior member of its exiled leadership, Izzat al-Rishq, hailed the "heroic operation," calling it a "natural response to the crimes of the occupation," in a post on Facebook.

Prime Minister Benjamin Netanyahu denounced the attack as a direct result of incitement by the Palestinian Authority of president Mahmud Abbas.

"The attack in Tel Aviv is a direct result of poisonous incitement from the Palestinian Authority towards Jews and their state. This is the same terror which tried to harm us in Paris, Brussels and everywhere," he said on his Facebook page.

Foreign Minister Avigdor Lieberman issued a statement blaming the attack on Abbas, Hamas, Israeli Bedouin and Arab Israeli politicians, saying it was part of a broader plot to kill Jews.

"They are all parts of the same branch whose aim is to ... kill Jews and to destroy Israel."

In Washington, State Department spokesperson Jen Psaki said there could be "no justification for such attacks against innocent civilians."

She called on all parties to "reject violence and seek a path forward toward peace."

British Foreign Secretary Philip Hammond strongly condemned the "terrorist attack," which undermines "the cause of peace."

France did the same, with the foreign ministry assuring the people of Israel "our solidarity."

"France is fully engaged in the fight against terrorism," a statement read.

The last attack in Tel Aviv was on November 10 when a Palestinian from the northern West Bank stabbed a young soldier who later died of his injuries.

That attack took place as Israel was struggling to contain a growing wave of violence in annexed east Jerusalem, which spread to Arab towns and villages in Israel.

It has since abated, although there have been a number of violent incidents over the past month.