TEL AVIV — A blast, a plume of smoke, the smell of gunpowder and a blown-up bus — scenes that had begun to fade from the collective Israeli memory came back in sharp relief on Wednesday, along with a renewed sense of vulnerability, when a bomb exploded on a passenger bus just after midday, injuring more than 20 people in the heart of Tel Aviv.

The residents of this Mediterranean city have often been derided by other Israelis who say they exist in a “bubble” of beaches, fashionable restaurants and bars. But that veneer of impunity faded as the city experienced its first terrorist bombing in years.

Even as Israeli and Palestinian officials announced a cease-fire on Wednesday, halting eight days of Hamas rocket attacks from Gaza and Israeli airstrikes there, the conflict extended its physical and psychological reach.

Moira Dror, 58, a resident of Netiv Haasara, a village near the Gaza border that has been hit by rockets and mortar shells for a decade, said, “Obviously, people hope that this is going to stop the rockets coming over.”