JERUSALEM — A bomb exploded on a bus in Bat Yam near Tel Aviv on Sunday minutes after the passengers were asked to get off, preventing casualties. The police said that initial evidence pointed to a terrorist attack, presumably by Palestinian extremists, the first of this kind in just over a year.

The bus driver, Michael Yoger, said passengers had noticed a large bag that had been left on a seat. When nobody claimed it, one of the passengers looked inside and saw wires, Yoger told the Israeli news media, adding that he then told the passengers to leave the bus. About 10 minutes later, he said, there was an explosion.

The blast affected the hearing of a police officer on the bomb squad at the scene, according to Micky Rosenfeld, a police spokesman. There were no other injuries.

Rosenfeld said that based on the type of explosive device in the bag and the fact that it had been planted on a public bus, “It was clear it was a terrorist attack.”

Save 75% on a Digital Subscription Today

President Shimon Peres of Israel thanked the bus driver in a telephone call, telling him, “The whole nation is saying prayers of thanks today; you saved so many lives with the speed and bravery of your actions.”

No Palestinian group immediately claimed responsibility for the bomb Sunday, but Fawzi Barhoum, a spokesman for Hamas, the Islamic extremist group that controls the Gaza Strip, praised the act. He said, “This is a brave, heroic work in response to the crimes of the occupation,” referring to Israel. “Resistance continues.”

Islamic Jihad, an extremist group, also praised the attack.

Israeli-Palestinian peace talks resumed in July, but they have been accompanied by tensions in the West Bank and along Israel’s border with Gaza. More than 20 Palestinians have been killed this year, according to Palestinian officials. Three Israeli soldiers and a retired colonel have been killed in recent months by Palestinians from the West Bank.

Scores of Israelis were killed in Palestinian suicide bombings on buses, in shopping centers and cafes during the second Palestinian uprising that began in 2000.

The last bus bombing took place in Tel Aviv in November 2012, shortly before a cease-fire came into effect ending eight days of fierce fighting across the Israel-Gaza border. Then, too, the bomb was in a bag that was left on the bus. More than 20 passengers were wounded. Israel said the planners of that attack were mostly Palestinians from the Ramallah area of the West Bank who were affiliated with both Hamas and Islamic Jihad.