Hamas fired more than a dozen rockets towards Israel after Israeli jets attacked several sites in Gaza on Saturday following renewed Palestinian protests along the border a day earlier in which a teenager was killed.
The Israeli attack was the largest daytime airstrike campaign in Gaza since the 2014 war, striking some 40 Hamas targets in the southern Gaza Strip, including a tunnel and other military compounds which were said to be involved in a recent spate of arson attacks using kites and balloons.
About 17 rockets were fired at Israel, the military said, five of which were intercepted by the Iron Dome aerial defence system.
There were, however, claims a ceasefire had been agreed late on Saturday.
"Egyptian and international efforts succeeded in ending the current round of escalation," a Palestinian official, who is familiar with the talks, told Reuters on condition of anonymity.
Although there were no reports of casualties on either side, the exchange threatens to spark another conflagration after weeks of tensions along the border.
Hamas said it fired the rockets to deter Israel from further action. Hamas spokesman Fawzi Barhoum said it was an "immediate response" that was meant to "deliver the message".
Israel has been warning Hamas that while it has no interest in engaging in the kind of conflict that led to the sides fighting three wars over the past decade, it would not tolerate Gaza militants' continued efforts to breach the border and airborne arson attacks on Israeli border communities.
The exchange of fire came as Palestinian President Mahmoud Abbas visited Moscow for talks on Saturday with Russian President Vladimir Putin. A Kremlin aide said they were expected to discuss the Middle East, bilateral projects and the transfer of the US Embassy from Tel Aviv to Jerusalem. The embassy move enraged Palestinians, who want East Jerusalem as capital of their future state.
On Friday, thousands of Palestinians gathered near the Gaza border for their near-weekly protest. Israeli troops shot dead a 15-year-old Palestinian who, the military claimed, had tried to climb over the fence into Israel.
The Gaza health ministry said 15-year-old Othman Rami Halles was killed east of Gaza City. A 20-year-old struck by gunfire Friday during the protests in the southern Gaza Strip had also died of his wounds. the ministry said, while a further 220 Palestinians were wounded in protests along the frontier.
Later, the Israeli military claimed an officer was wounded by a grenade.
Palestinians in Gaza have for months been demonstrating against Israel's decade-long blockade of the territory and in support of their right to return to lands they fled or were driven from during the war surrounding the creation of Israel in 1948.
At least 140 Palestinians have been killed by Israeli fire since the protests and clashes broke out along the border on March 30.
No Israelis have been killed.
The Israeli blockade of Gaza was imposed after Hamas seized control of the territory in 2007 and has caused widespread hardship for its residents, including high unemployment, acute power shortages and lack of adequate medical care.