Two rockets fired from the Islamist-run Gaza Strip hit a southern Israeli border town on Thursday, drawing condemnation from visiting U.S. President Barack Obama.
A group with links to al Qaeda, called Magles Shoura al-Muhahddin, claimed responsibility for the strike on Sderot near the Gaza frontier that wounded no one but damaged the side of a building.
In an online statement, the movement said it had launched the rockets during Obama's visit to show their attacks could not be stopped by Israeli air defences – a possible reference to Israel's partially U.S.-funded Iron Dome anti-missile battery.
Obama, who was in Jerusalem about 80 km from Sderot when the rockets hit, later told journalists it was up to Hamas, which controls Gaza, to stop such strikes.
"We condemn this violation of the important ceasefire that protects both Israelis and Palestinians, a violation Hamas has a responsibility to prevent," Obama said on the next stop on his visit to the region, in the West Bank city of Ramallah.
The attack was the second time rockets launched from Gaza have hit Israel since a truce, which the Shoura group never signed, ended an eight-day cross-border war in November.
Palestinians seek a state in the West Bank and the Gaza Strip with Arab East Jerusalem as its capital – territories Israel captured in the 1967 Arab-Israeli War. Israeli-Palestinian peace negotiations have been stalled since 2010.
Shoura is a coalition of hardline Salafist Muslims, thought to originate in Egypt's Sinai region bordering Gaza. It has claimed several rocket strikes at Israel, and Israel killed two of its commanders in a targeted air strike in Gaza in October.
Obama visited Sderot when he was a presidential candidate in 2008, meeting locals and viewing an exhibit of rocket remnants from frequent attacks by Gaza-based militants.
He referred to the town when he arrived in Jerusalem at the start of his latest visit on Wednesday, telling journalists: "I've stood in Sderot, and met with children who simply want to grow up free from fear. And flying in today, I saw again how Israel's security can be measured in mere miles and minutes."
Obama is on a three-day visit to Israel, the occupied West Bank and Jordan. He will not travel to Gaza, whose rulers have sworn to destroy Israel.
Western-backed Palestinian President Mahmoud Abbas, who met Obama in Ramallah, said he condemned "violence against civilians regardless of its source, including rocket firing," according to the official Palestinian Wafa news agency.
Obama inspected an Iron Dome anti-missile battery at Tel Aviv airport on Wednesday.