Egypt's state news agency is reporting that a naval patrol near one of the country's Mediterranean ports has come under attack from three boats, prompting an exchange of fire that wounded no sailors.
A military official told the MENA news agency that armed men from boats fired at the naval patrol on Wednesday north of the port of Damietta.
The official said air force and navy fighters were deployed to rescue the patrol after their boat caught fire.
He said reinforcements "destroyed" the three attacking boats and 20 people were subsequently arrested.
The official, unnamed in the report, did not identify the attackers. Human smuggling is common in the Mediterranean.
Troops increasingly have come under attack from armed groups since the toppling of President Mohamed Morsi last year, though never at sea.
Aaron Reese, from the Institute for the Study of War, told Al Jazeera that the attack would have been fairly easy to orchestrate.
"I doubt that the navy expected this to happen, and fishing traffic is quite common in the area, so all it would have taken would have been to give some sailors some guns," he said.
"It is possible this could have been smugglers, it could also have been a pre-planned attack. Either way it highlights the danger to shipping traffic in the Suez Canal."
The attack comes amid a worsening security situation for Egypt, especially in the Sinai peninsula.
A car bomb on Tuesday wounded 10 people in the Sinai town of El Arish, a volatile area where security forces have been tackling armed groups.
Source: Al Jazeera and agencies