Brig. Gen. Mohammed Samir said on his official Facebook page that an Egyptian naval vessel was attacked Wednesday and set ablaze by "terrorist elements" about 40 miles off the port of Damietta.
All four boats used by the assailants were destroyed after air and naval reinforcements were called in, Samir said, and 32 attackers were arrested.
Egyptian forces have been fighting Islamic insurgents in the northern Sinai Peninsula, with sporadic attacks elsewhere in Egypt, but clashes at sea are almost unheard of.
Human smugglers are active in the Mediterranean waters of Egypt and North African neighbors such as Libya. Thousands of migrants make the risky journey every year, with hundreds dying in the process.