Most students had already left for the weekend, but several people at a religious school in Sderot had stuck around Thursday night. Three of them were just sitting down to study Biblical psalms when a rocket alarm rang out just before 9 p.m.
Seconds later, a missile slammed into a wall just steps away, sending concrete and glass flying but leaving them unharmed.
Eyewitnesses said that had the rocket hit a few minutes earlier, when the main study hall was filled with students, or a few meters from where it did, it could have been a very different story.
"It happened two-three meters from me," said Shalom Kahlon, a former student who was in the study hall at the time of the explosion, speaking to the Ynet news website.
"It hit the wall, three meters from there, that's where I was sitting. If the rocket had been half a meter to the side I don't know if I would be speaking now," he added.
Kahlon and others described hearing a massive boom as the rocket hit the multi-story building housing the school Thursday evening, though there was no explosion from a warhead, which could have caused much greater devastation.
The strike still managed to break several tempered windows and leave a large hole in an outside wall where it made a direct impact, with concrete rubble strewn across a sidewalk below. Nonetheless, authorities said there were no injuries.
"It was a miracle," the head rabbi of the yeshiva, Shlomo Binyamin, told Channel 12 news. "Just 10 minutes earlier there had been 15 students saying evening prayers in the room."
Some 150 students attend the Lev Ladaat hesder yeshiva, according to its website. Had the rocket struck on another day of the week, more students could have been present - but many of them had seemingly already left for the weekend.
A Chabad Lubavitch synagogue adjacent to the school was also occupied by several people, according to Rabbi Moshe Zeev Pizem, who was leading a weekly Bible study session at the time.
"We were busy with a Torah class and in the middle of the lecture there was a siren, and seconds later a huge strong blast, which made everyone jump," he told Channel 13 news. "A moment later we all realized we were alive."
Due to its proximity to Gaza, Sderot residents have just 15 seconds or less to seek shelter when a rocket alarm sounds. Many newer buildings in the city, which has been pummeled by thousands of rockets since the early 2000s, are constructed of reinforced concrete. The yeshiva building was constructed in 2012.
The rocket was the second to be shot from Gaza Thursday, but unlike the first, was not intercepted by the Iron Dome anti-missile system, for reasons that were not immediately clear early Friday.
Politicians and others called for a major military operation on Thursday night, including assassinating leaders of Hamas, to stem the rising violence.
"The situation as it is cannot continue," Sderot Mayor Alon Davidi said. "As I said in the past, only a military operation will bring peace to our region."
Palestinians reported air strikes near Gaza City early Friday in apparent response to the rocket strike.
Tensions with Gaza have been steadily rising in recent days, with Israel blocking Gazan fishermen from access to the sea Wednesday in response to incendiary balloons being launched over the border.
The tensions have threatened to undo an unofficial ceasefire brokered after a major flare-up in early May in which the sides exchanged the most intense fire in years, leading to the deaths of four Israelis and 29 Palestinians. Gazans say Israel has been slow in implementing parts of the deal.