The Egyptian military said one of its navy vessels came under a "terrorist" attack in the Mediterranean, leaving five servicemen injured and eight others missing at sea.
Four boats used by the assailants were destroyed and 32 of the suspected fighters were arrested, the military said in a statement.
The Egyptian government is fighting an insurgency that has killed scores of policemen and soldiers, but a maritime attack is unprecedented.
An earlier report on the official MENA news agency reported that a naval vessel had been set alight in an exchange of fire with assailants about 70km from Egypt's shore.
It said the air force was called in to deal with the attackers.
The military described it as a "terrorist" attack that took place on Wednesday morning off the coast of the Damietta province in the country's north east.
"Search and rescue operations have evacuated five wounded servicemen to a military hospital ... and there are still eight personnel lost and the search continues," it said in the statement.
The military said it destroyed "four boats used by the armed assailants, including terrorists, and arrested 32 people".
Those captured were under interrogation, the statement added.
It was not immediately clear what the naval boat was doing so far offshore, and whether it was on a routine patrol anticipated by fighters.
A military source told the AFP news agency the attackers used "fishing boats" and did not appear to have deployed rocket propelled grenades or heavier weapons.
The Mediterranean Sea is used by drug traffickers and illegal migrant smugglers who have been intercepted by the Egyptian navy in the past.
There have been no recorded attacks at sea by the Sinai-based armed fighters who launched an insurgency after the army overthrew President Mohamed Morsi last year.
Wednesday's incident comes days after a group calling itself Ansar Beit al-Maqdis pledged its allegiance to the Islamic State of Iraq and the Levant (ISIL), a Sunni group that has seized territory in Syria and Iraq.
The group has focused its attacks on troops in Sinai, but has occasionally carried out car bombings and ambushes across the country.
Its pledge of allegiance to ISIL was the most significant regional show of support for the fighters who control swathes of Iraq and Syria.
Created during the security vacuum following veteran Egyptian strongman Hosni Mubarak's overthrow in early 2011, Anar Beit al-Maqdis has displayed increasing sophistication in its attacks despite a massive military crackdown.
It is believed to have been behind a multi-stage attack on an army checkpoint in North Sinai last month that killed at least 30 soldiers, and wounded a senior officer.
Several of its members who carried out attacks, including an attempt to assassinate the interior minister last year, have previously fought and trained alongside rebels in Syria.