(Releads with officers killed, adds details, background)
CAIRO, July 25 (Reuters) - Two high-ranking Egyptian police and army officers were shot dead by unknown assailants on Friday in the Sinai region near the border with Israel, army and security sources said.
Both had the rank of brigadier general and were shot dead in the city of Sheikh Zuwaid, the sources told Reuters.
Security forces are struggling to quell an Islamist insurgency that has killed scores of soldiers and policemen in the peninsula, which borders Israel and the Palestinian Gaza Strip.
The attacks surged after the military overthrew Islamist president Mohamed Mursi last year and the militants extended their reach to the Egyptian mainland with a series of bombings.
Separately, Egyptian militant group Ansar Bayt al-Maqdis said in a statement that three of their fighters had been killed in their car in Sinai region.
The militant group said they had been killed by an Israeli drone but an Egyptian Defence Ministry source denied the incident. The Israeli military declined to comment.
An earlier statement from the armed forces spokesman said that the Egyptian army killed three militants in their car during a raid on Wednesday.
"There has been no violation of Egyptian airspace by any kind of aircraft, whether israeli or others," the source said.
Ansar Bayt al-Maqdis made the announcement on Friday morning on a website on which it regularly posts its statements.
"A number of Ansar Bayt al-Maqdis Jihadists were martyred as their car was hit by an Israeli drone on Wednesday evening," the group said in the statement, listing three.
The militants' statement did not elaborate on how they knew they had been targeted by a drone, which often attack from high altitude and use advanced munitions that make them almost invisible and inaudible.
Among the objectives of Sinai jihadis is undermining the 1979 peace treaty between Israel and Egypt, under which the Sinai was demilitarized. Israel says its air force does not operate over Egypt.
The United States designated the group as a terrorist organisation in April, saying it had launched rockets at Israel's southern city of Eilat and attacked Israeli border guards. It has also targeted Egyptian and foreign tourists and Israel, the department said.
The Sinai-based group, formed in the wake of the 2011 uprisings in Egypt, has claimed responsibility for several high-profile attacks, including an assassination attempt on Egypt's interior minister last year.
(Reporting by Mostafa Hashem and Oliver Holmes and Asma Alsharif; Editing by Angus MacSwan)