Pakistani troops have ended a siege by militants and recaptured the naval air force headquarters in Karachi after a 16-hour battle on Monday.

More than 20 militants captured the PNS Mehran base on Sunday, blowing up at least one aircraft. About 12 soldiers were killed and 14 wounded in the battle that started at 10.30 p.m. on Sunday.

The operation is over and the troops are clearing the main building, a security official told Reuters. The search is going on to seek if there are any more terrorists, the official said.

The Pakistan Taliban says the attack was to take revenge by US Special Forces who killed Osama Bin Laden on May 2.

It was the revenge of martyrdom of Osama Bin Laden and we are still united and powerful, Ehsanullah Ehsan, Taliban spokesperson told Reuters.

The militants had used guns and grenades to storm the base, reports Reuters quoting security sources.

Karachi residents said they could not believe that security near the naval base could have been so negligent.