Updated

Afghanistan's intelligence agency said Thursday that its men shot dead two members of a Pakistan-based militant group who opened fire on Afghan worshippers at a Shiite Muslim mosque.

The National Directorate of Security said the attackers, disguised in police uniform, were armed with AK-47 rifles and pistols when they attacked in west Kabul.

"Two Pakistani nationals who were members of Lashkar-e-Jhangvi had orders from their masters to carry out brutal attacks on worshippers in the mosque in west Kabul," it said in a statement.

"Fortunately, the two terrorists were shot dead by Afghan intelligence forces in an exchange of fire," it added.

Three Afghan worshippers were wounded and taken to hospital, according to the statement.

Lashkar-e-Jhangvi is one of Pakistan's most violent anti-Shiite militant groups and has links to Al-Qaeda. It has been blamed for multiple attacks targeting Shiites.

The Afghan intelligence agency statement also accused "certain known circles" within Pakistan's Inter Services Intelligence spy agency of trying to stoke sectarian violence in Afghanistan.

Kabul officials often accuse the Pakistani government and its intelligence agents of sheltering insurgents and supporting them in attacks in Afghanistan -- allegations that Pakistan denies.

President Hamid Karzai last week spent two days in Pakistan, asking its new government to help set up peace talks between his administration and Taliban insurgents.

Around 87,000 US-led NATO troops are to leave Afghanistan next year, putting the country's police and troops in charge of security nationwide.