An Israeli strike on Gaza overnight killed two people whom Palestinian officials described as border guards, but Israel said it had thwarted an attack in the advanced planning stage.
"Two citizens were martyred and another was wounded in an Israeli air strike on a car in Rafah city," Palestinian health ministry spokesman Ashraf al-Qudra told AFP of the attack on the southern city.
Officials in Gaza's Hamas-run interior ministry said the air strike killed two border guards and seriously wounded a third as they were patrolling the frontier with Egypt.
The ministry named the two dead men as Lieutenant Ashraf Saleh, 33, and his deputy, Anis Abu al-Aynin, 22. The third, who was seriously hurt in the strike, which occurred just before midnight (2100 GMT Wednesday), was also a lieutenant in the security forces.
"The martyrs were on their routine daily business of inspecting and securing the southern border of the Gaza Strip and Egypt," a ministry statement said.
Medics and an AFP photographer confirmed the strike hit an official security service vehicle.
But the Israeli military said it had prevented an attack "at a very advanced stage of planning" that involved infiltrating militants via Egypt's Sinai Peninsula.
"The IDF (Israel Defence Forces) and Shin Bet (security service) follow everything that happens in Gaza," the military said on its official Twitter account.
"The attack we thwarted last night was at a very advanced stage of planning.
Signup to our newsletter and follow us on Facebook and Twitter!
"Terrorists planned to exit Gaza into Sinai and then enter Israel through our border fence and attack the heart of country during the holidays," it said, referring to the Jewish holidays of Yom Kippur, which starts next Wednesday, and Sukkot in early October.
The military said Gaza's Hamas rulers "knew what was happening," adding that the Islamist group "collaborates with smaller terrorist orgs in Gaza and does not prevent them from carrying out attacks."
In an earlier statement, the army said the strike had targeted members of "Defenders of Al-Aqsa," which it described as "a terrorist group sponsored by Hamas in the Gaza Strip."
It said Aynin had previously been involved in smuggling explosives into Israel from Sinai and "was in the final stages of preparing to carry out a terror attack against Israeli civilians."
He had also previously been involved in "directing certain terror activity" in the West Bank, it added.
The army statement accused Saleh of belonging to the Popular Resistance Committees and said he had been involved in arms smuggling and "transferring two terrorists into Egypt in order to carry out a suicide attack in Israel."
The two men were buried on Thursday morning with hundreds of police in uniform attending their funerals in Rafah and the nearby Tel al-Sultan neighbourhood.
Despite an informal truce between Hamas and Israel, tensions flare periodically on the Gaza-Israel border, with militants firing rockets at Israel and the military launching retaliatory air strikes.
The last major flare-up was in June, when militants fired more than 150 rockets at southern Israel, wounding five people, and Israel hit back with air strikes that killed 15 Palestinians.
Late on Thursday morning, militants fired two mortar rounds towards Israeli troops posted along Gaza's northern border with Israel, without causing casualties, a military spokeswoman told AFP.