Rockets fired by Palestinian militants have killed two Israeli children and wounded at least 10 people in Sderot.
The attack came in the hours before the Sukkot festival
Two rockets fell as people gathered to celebrate the Sukkot harvest festival and amid a major military operation Israel said aimed to stop such attacks.
Israeli helicopter gunships attacked the Jabaliya refugee camp afterwards, killing two Palestinians, and also hit a suburb of Gaza City.
Tension is high as Palestinians mark four years since the intifada began.
Three Palestinian teenagers were killed during the day as Israeli troops continued their operation in the northern Gaza Strip, which they began on Tuesday night.
First reports from Sderot spoke of a baby and another child being killed when makeshift Qassam rockets hit a residential block in the town.
But Israeli media later said the two victims were children aged three and five from the same family.
Local man Ronen Edri spoke of "hysteria" at the scene of the attack where he tried to help an injured boy.
"People were screaming and crying from shock," he was quoted by Haaretz newspaper as saying.
Another resident, Haviv Ben, said one child had lost their legs.
"All our town is crying," he said.
Shouts of "death to Arabs" could later be heard in the area, reports said.
Palestinian militants often fire homemade Qassam rockets from the area near the Jabaliya camp at the town of Sderot, but they rarely cause casualties.
Israeli government spokesman Gideon Meir said the Sderot attack had been timed to disrupt the Sukkot holiday.
"No state can tolerate such an attack on its citizens and it is the government's obligation to protect its citizens," he said.
Two people are known to have been killed by Qassam rockets before the latest attack, which was claimed by the Hamas militant group.
"We will continue with this honourable battle until we achieve either victory or martyrdom," said Nizar Rayan, a local Hamas leader in Jabaliya.
An Israeli helicopter fired at least one rocket at a target in the north of Gaza City shortly after the Sderot attack, knocking out power supplies, Palestinian witnesses said.
A helicopter also fired two rockets at an unspecified target in the Jabaliya refugee camp, where two died and several were injured, local doctors reported.
The camp, often linked to rocket attacks against Israel, was the scene earlier of riots in which Israeli troops killed two Palestinian youths while battling stone-throwers.
The two teenagers killed in Jabaliya were identified as Ahmed Madi, 17, and Said Abu Aish, 14.
Elsewhere in the Gaza Strip, Mohammed Jaber, also 14, was killed near Netzarim during a riot there.
The Israeli military had no immediate comment on the killings in Gaza, but
Israeli military sources were quoted as saying soldiers opened fire on two Palestinians seen planting a bomb.
It is the third time in recent months that the Israeli army has launched a major incursion into Gaza to try to halt rocket strikes.
Palestinian cabinet minister Saeb Erekat condemned the Israeli operation in Jabaliya, saying it showed Israel was preparing to reoccupy Gaza "at a time when [it] is talking about withdrawal and disengagement".
In previous operations, the troops killed a number of Palestinians and caused great destruction but the rocket launches continued.