President believes battle in which 10 children and a US agent died was fought by illegal militia working for spy agency

President Hamid Karzai is determined to curb CIA operations in Afghanistan after the death of a US agent and 10 Afghan children in a battle he believes was fought by an illegal militia working for the US spy agency.

The campaign sets the Afghan leader up for another heated showdown with the US government, and will reignite questions about the CIA's extensive but highly secretive operations in the country.

Karzai's spokesman Aimal Faizi said the CIA controlled large commando-like units, some of whom operated under the nominal stamp of the Afghan government's intelligence agency, the National Directorate of Security (NDS), but were not actually under its control.

"Some of them are said to be working with the NDS, but they are not armed by the NDS, not paid by the NDS, and not sent to operations by the NDS. Sometimes they only inform the NDS minutes before the operation," Faizi said. "They are conducting operations without informing local authorities and when something goes wrong it is called a joint operation."

One of these groups was involved in a battle with insurgents in a remote corner of eastern Kunar province in early April that left several Afghan children dead, Faizi said. Karzai has fired the provincial head of intelligence in connection with the incident.

The US citizen who died during the battle was advising the Afghan intelligence service, and the airstrike that killed the children is believed to have been called in after he was fatally injured.

The US embassy declined to comment on CIA issues, but sources with knowledge of the battle said he was an agent, and his name has not been released, usually an indication of intelligence work.

Bob Woodward in his 2010 book Obama's Wars described a 3,000-strong Afghan militia working for the CIA, and Faizi said the Afghan government had little information about the teams. "There is a lack of clarity about their numbers and movement," he said when asked how many men the CIA had on their payroll, or where these large teams might be based.

Woodward said the unofficial commando units were known as counter-terrorism pursuit teams, and described them as "a paid, trained and functioning tool of the CIA", authorised by President George W Bush.

They were sent on operations to kill or capture insurgent leaders, but also went into lawless areas to try to pacify them and win support for the Afghan government and its foreign backers. Woodward said the units even conducted cross-border raids into Pakistan.

In the wake of the Kunar battle, Karzai has also ordered his security officials to step up implementation of a presidential decree issued in late February abolishing "parallel structures". Faizi said this order was aimed primarily at dismantling CIA-controlled teams.

"The use of these parallel structures run by the CIA and US special forces is an issue of concern for the Afghan people and the Afghan government," he said.

For Karzai the move is another step towards reasserting Afghan sovereignty, part of a long campaign waged against US forces and their allies. He has already won control of the main US-run prison in the country, and ended unilateral night raids on insurgent hideouts that coalition commanders once described as critical to the war.

But Karzai's move comes at a critical time for an already volatile relationship, when Washington and Kabul are trying to negotiate what, if any, military presence the US will have in Afghanistan beyond 2014, and curbing the CIA's reach could strike at the heart of US strategic interests there.

Barack Obama has been clear that the US does not plan to fight the Taliban after next year. Instead some foreign troops will train Afghan soldiers to fight the insurgency while US special forces pursue groups such as al-Qaida hiding along the lawless border with Pakistan.

While the US is expected to keep a few thousand soldiers in Afghanistan, bolstered by troops from Nato allies, Obama has also made clear there is "zero option" of a complete US withdrawal, as happened in Iraq.