Insurgents in the Sinai Peninsula exchanged fire with an Egyptian navy ship operating off the Mediterranean coast, setting it on fire, officials said on Thursday.
Militants from an Islamic State (IS) linked group calling itself Sinai Province have since claimed that they fired a rocket at the vessel.
The ship spotted a group of militants while patrolling close to the city of Rafah on the border with Gaza, then moved to engage them resulting in a clash, Brig. Gen. Mohammed Samir said in a statement on his Facebook page.
It subsequently caught ablaze and other boats were deployed to provide assistance and attempt to locate the attackers, Samir added, noting that there were no navy casualties. The spokesman did not provide any further information on the type of ship involved
Witnesses in Gaza told Agence France-Presse that they had heard an explosion when the vessel was around two miles from the coast.
The Sinai region has been in the grip of a full-blown insurgency since democratically elected Islamist President Mohamed Morsi was ousted by the military two years ago. Hundreds of members of the security forces have since lost their lives in the fighting.
The Sinai Province group has launched a series of coordinated attacks on army checkpoints in and around the northern Sinai town of Sheikh Zuweid on July 1.
The military said in a subsequent statement that 17 soldiers had died, along with 100 attackers, but security and medical officials quoted by international and local outlets, including the Associated Press, reported that at least 60 troops were killed, making it the deadliest battle in the area since 1973's Arab-Israeli war. Days earlier state prosecutor Hisham Barakat was killed in a Cairo car bombing that the group also said it carried out.
Sea-borne incidents are rare, although the navy repulsed an attack by militants that fired on one of its vessels from a fishing boat in November, killing four of the attackers.
Authorities were investigating the possibility that Thursday's attack was the result of explosives attached to the ship then detonated remotely, as well as that it that it was hit with a rocket fired from the shore, according to security officials quoted by the Associated Press.
The state-affiliated el-Watan daily newspaper reported that advanced weapons, including Russian-made Kornet anti-tank missiles, had been used in the Sheikh Zuweid attack along with mortars and heavy machine guns.
The Sinai Province group also claimed responsibility for an incident on Wednesday this week during which it said a suicide bomber had detonated a car packed with explosives at a military post, killing a number of soldiers. The military disputed this version of events, and Samir said it had received intelligence on the attack and prepared to thwart it, firing on the car and blowing it up without taking any casualties themselves.
Follow John Beck on Twitter: @JM_Beck