Pakistan's navy says it has repelled an attack on a naval dockyard in Karachi that saw two militants and a sailor killed.

The navy issued a statement late Monday night saying the attack happened on Saturday. It said authorities arrested four of the attacks, while seven other sailors were wounded in the assault.

It said other arrests happened around the country after the assault.

Naval Commander Kamran Asif told The Associated Press that the militants were armed with rocket launchers, assault rifles and hand grenades. Authorities did not say what group the militants belonged to and no one immediately claimed responsibility.

In 2011, Pakistani Taliban fighters attacked a naval base in Karachi, an assault that lasted for 18 hours and killed 10 people, deeply embarrassing the military.