Two rockets fired from the Gaza Strip have hit southern Israel as US President Barack Obama was making his first official visit to the country in four years, police said.

"One exploded in the backyard of a house in Sderot, causing damage and the second landed in a field," police spokesman Micky Rosenfeld told AFP news agency on Thursday, referring to a town very close to the Gaza border.

As a presidential candidate in 2008, Obama visited Sderot, which is frequently targeted by rocket attacks from the Gaza Strip.

No group immediately claimed responsibility for Thursday's attack, which came as Obama was in Jerusalem. 

Obama arrived in Ramallah on Thursday for talks with Palestinian president Mahmoud Abbas.

Al Jazeera's online producer Gregg Carlstrom, reporting from Ramallah, said a small group of people made up of no more than a few dozens, were demonstrating against Obama at the centre of the city.

"They are being blocked by about twice as many police," our producer said.

It was only the second such rocket attack since the end of a deadly eight-day confrontation between Israel and Hamas in November which ended with an Egyptian-negotiated truce that has been almost completely respected.

On February 26, Gaza Strip fighters fired a single rocket which landed near the southern coastal town of Ashkelon in an attack they said was to protest the death of a Palestinian prisoner in Israeli custody following interrogation.

During the eight days of bloodshed in November, which cost the lives of 177 Palestinians and six Israelis, the army said 933 rockets hit Israel, while another 421 were intercepted in mid-air by the US-funded Iron Dome air anti-missile system.

Obama visited the vaunted Iron Dome system shortly after arriving in the country on Wednesday afternoon.

Source: Agencies