Tel Aviv: A knife-wielding Palestinian attacked passengers on a bus in Tel Aviv on Wednesday wounding at least 12 people before being shot by a passing prison officer, Israeli police said.

It was the first attack in Tel Aviv since mid-November when a young Israeli soldier was stabbed to death by a Palestinian.

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

Twelve people were wounded in the attack, including three who were 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 for further investigation.

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 by Israeli television channels 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 a 23-year-old Palestinian from Tulkarem in the northern West Bank, who was staying in Israel illegally.

Pictures from the scene released by the police showed what looked like a large kitchen knife lying on the ground.

Speaking to army radio, the prisons service officer, identified only as Benny, 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," he told the radio.There was no claim of responsibility for Wednesday`s attack but the incident was praised by the Islamist Hamas movement.

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

Israeli 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.

"We shall continue to work forcefully against terror which has tried to harm us ever since the creation of the state and we shall ensure it does not achieve its aims."

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 destroy the Jewish state," he said.

"So we must work determinedly against all of these people, who... have the same aim: to kill Jews and to destroy Israel."

The last attack in Tel Aviv was on November 10 when a Palestinian from the northern West Bank stabbed a young Israeli 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.

The attacker struck in the morning rush hour in the heart of Israel`s largest city, police spokeswoman Luba Samri said.

Five people were moderately to seriously wounded, while four were lightly injured, she said, citing emergency services at the scene.

It was not immediately clear if all the casualties had been stabbed or if they included some suffering from shock.

"The suspect is a 23-year-old Palestinian from (the West Bank town of) Tulkarem," Samri said.

"The attacker was foiled by an officer from the prisons service who shot and wounded him in the leg.

"Police arrested the terrorist. He was taken to hospital and for further interrogation," she added.