Al-Qaeda's new South Asia branch has claimed responsibility for a raid on a Karachi naval yard that left a sailor and three attackers dead, adding they had help from former military officials.

It is the first attack claimed by the fighter network's new wing, whose creation was announced by chief Ayman Al-Zawahiri last week.

The claim of responsibility, released on Thursday, will likely add to concerns about infiltration of the Pakistani military's ranks after the Taliban, who also claimed to be behind the attack, said they received inside help.

Khawaja Asif, Pakistan's defence minister, had voiced concerns when addressing parliament on Wednesday, saying: "We cannot rule out the inside help in this attack because without it the miscreants could not breach security."

Inside Story: Al-Qaeda vs Islamic State?

Al-Qaeda in South Asia was launched last week in what experts see as a bid to remain relevant in the face of rising competition by the IS group.

"The operation near Karachi shore was an attack by al-Qaeda in the Subcontinent," an Urdu-language statement from the group sent to AFP news agency said.

It claimed that the target of the raid was a "US supply ship" and said the dead attackers included former Pakistan navy officers.

It was not immediately possible to confirm whether a US ship was present at the port.

Commodore Nadeem Bukhari, a spokesman for the Pakistan navy said an investigation into the attack was under way.

"It cannot be ruled out but it is still premature to say that it was an inside work," he told AFP.

Al-Qaeda said the officers quit their jobs and joined the fighters after growing becoming radicalised.

Al-Qaeda was previously linked to a 2011 raid on another Karachi naval base that lasted 17 hours resulting in the deaths of 10 personnel and destruction of two US-made spy planes.

Source: Agencies