JERUSALEM  A Katyusha-type rocket fired by militants from Gaza struck the Israeli coastal city of Ashkelon on Friday, damaging buildings and causing panic after more than a year of relative calm.

There were no injuries, but the police said that several residents of Ashkelon, about 10 miles north of Gaza, were treated for shock. The last time the city was hit by rocket fire was in February 2009, according to an Israeli military spokeswoman. She noted that there had been many failed attempts to hit the city since Israel ended its three-week offensive in Gaza in the winter of 2008-9.

Ashkelon, with a population of about 125,000, was hit frequently by rockets during the war. Gaza is governed by the Islamic militant group Hamas, which won elections in 2006.

Richard Miron, a spokesman for the United Nations Middle East envoy, said in a statement on Friday that “indiscriminate rocket fire against civilians is completely unacceptable and constitutes a terrorist attack.”