Pakistan's army and officials say a group of militants attacked a mosque at a military facility in northwestern Pakistan on November 26, leading to a shootout that left four assailants and two soldiers dead.

Pakistani army spokesman Asim Bajwa said on Twitter that that security forces "valiantly defeated" the attackers at the Ghalani Camp in the Mohmand tribal region on the border with Afghanistan.

He said all four "suicide bombers" and two soldiers were killed in the incident.

The army added in a statement that 14 troops were wounded in the suicide attack as well.

The statement said that the attackers attempted to enter the camp and began firing once they reached the mosque, where a large gathering of residents and recruits were present. The attackers were "contained in the outer courtyard," the statement added.

The Associated Press cited two unidentified security officials as confirming the account of the incident and saying that a manhunt had been launched for any possible accomplices.

With reporting by AP