The Islamic Jihad militant group said it carried out the attack
Israel has declared that a rocket attack by Palestinian militants on the southern town of Sderot was a "grave violation" of a six-day-old truce.
No injuries were reported after at least two rockets were fired from Gaza, the first since the agreement came into force in the Hamas-run territory.
Israel says it may now re-impose economic sanctions against Gaza.
Islamic Jihad said it carried out the attack to avenge an Israeli raid in the West Bank in which two died.
The two Palestinians were killed in an Israeli military operation in a university building in the West Bank town of Nablus.
Islamic Jihad said one of the dead was one of its senior fighters.
Local reports said the other man was a student, and not a militant. The Israeli army said both men were armed.
One of the rockets fired at Sderot hit the back garden of a house, while another landed in open ground, police in the town said.
There were no injuries, officers said, although two people were treated for shock.
Aftermath of the rocket strike
The Israeli government had previously warned it would respond with considerable force if any of the Palestinian groups resumed violence.
Hamas, the main Palestinian faction in Gaza, has urged all sides to respect the ceasefire.
Speaking at a donors' conference in Berlin, Palestinian Prime Minister Salam Fayyad said it was "essential for the ceasefire to be sustained".
"Whatever damage has been done to the process, that damage should be undone as quickly as possible," he said.
A spokesman for Islamic Jihad accused the Israelis of breaking the ceasefire with its operation in Nablus.
The group had earlier said attacks on its militants in the West Bank could jeopardise the truce in Gaza.
While the West Bank is not covered by the truce, correspondents say incidents like these have put a strain on similar ceasefires in the past.
The Israeli army said the Islamic Jihad member, Tareq Abu Ghali, had been planning a bomb attack and that troops had found weapons and explosives in his rooms.
The official Palestinian news agency said both men had multiple bullet wounds and that one had been shot in the head at close range.
Meanwhile, Israeli Prime Minister Ehud Olmert has been holding talks with the Egyptian President Hosni Mubarak in the Red Sea resort of Sharm el-Sheikh.
Israeli officials say Egypt has given assurances that its Rafah border crossing with the Gaza Strip will remain closed until the case of the captured Israeli soldier, Gilad Shalit, is resolved.
Israel wants Sergeant Shalit to be freed as part of the truce but Hamas says the issue must be resolved through an exchange of prisoners.
Mr Mubarak said his government was trying to secure the release of the soldier, who has been held by Palestinian militants in Gaza for the past two years.
The Egyptian-brokered truce between Israel and Hamas in Gaza started on 19 June and is supposed to last six months.
It is designed to halt Israeli incursions into the Gaza Strip, and to stop missiles being fired from Gaza into southern Israel.
If it holds, Israel will ease its blockade on Gaza and there may be further talks on a prisoner exchange.