An Israeli strike on Tuesday killed two militants of the Gaza Strip's ruling Hamas movement after shots were fired at soldiers, Gazan and Israeli officials said.
The Islamist group's military wing, the Ezzedine al-Qassam Brigades, confirmed in a statement that the dead men were its fighters, naming them as Ahmed Murjan and Abdel-Hafez al-Silawi.
It said a series of explosions had targeted a military site while it was being visited by senior leaders, without naming them.
An Israeli military statement, apparently referring to the same incident, said that the army returned fire after shots were fired at its soldiers from a Hamas post in the northern Gaza Strip, next to the border with Israel.
Palestinian security sources said that the Israeli attack was in the north of the strip.
A video distributed by the Israeli army appeared to show a tank striking a military post in the Gaza Strip.
The military said it was prepared "to target any aggression against Israel and holds Hamas responsible for everything happening in and from the Gaza Strip."
It added that no Israeli troops were injured in the exchange.
Hamas warned Israel that it would pay for the attack, without elaborating.
"The resistance cannot allow the occupation to impose a policy of bombing sites and targeting fighters without paying the price," it said in a statement.
Speaking later, Hamas leader Ismail Haniya condemned what he called a "crime."
He said the movement was facing "rapid political and field developments."
Since Palestinian protests and clashes along the Gaza border erupted at the end of March, at least 160 Palestinians have been killed by Israeli fire.
One Israeli soldier has been shot dead by a Palestinian sniper.
The protests call for Palestinians to be able to return to the land they or their families fled or were expelled from in the 1948 war surrounding the creation of Israel.
Israel says any such return would mean its end as a Jewish state.
Gaza's Islamist rulers Hamas have fought three wars with Israel since 2008.
The United Nations and Egypt are currently trying to secure a deal between Israel and Hamas for a lasting truce.
Fighters from the Ezzedine al-Qassam Brigades, the armed wing of the Palestinian Hamas movement, take part in a military show in the southern Gaza Strip city of Khan Yunis on December 5, 2017