Pakistan has strongly condemned the "heinous terrorist attack" on a gurdwara (Sikh temple) in Afghanistan on Wednesday, which killed more than two dozen people and wounded several.

“Such despicable attacks have no political, religious or moral justification and must be rejected outright,” said the Foreign Office in a statement.

The FO said that Pakistan condemns terrorism in "all its forms and manifestations", adding that all places of worship must be respected.

“Our hearts go out to the families who have lost their loved ones in this inhuman act and we pray for the swiftest recovery of the injured. We also express our abiding solidarity with the fraternal people of Afghanistan,” read the official statement from the ministry.

At least 25 people died and 8 were wounded as a Sikh religious complex in the Afghan capital of Kabul was attacked by unidentified gunmen and suicide bombers today, the Afghan government said.

Several hours after the early morning attack was launched, Interior Ministry spokesman Tariq Arian said in a message to journalists that an operation by the security forces was over and all of the attackers had been killed.

Taliban denied any involvement in the attack.