Updated

NATO and Afghan forces killed a former Guantanamo detainee who had become a key Al Qaeda affiliate after returning to Afghanistan, officials said Saturday.

Sabar Lal Melma, who was released from Guantanamo in 2007 after five years of detention, had been organizing attacks in eastern Kunar province and funding insurgent operations, NATO spokesman Capt. Justin Brockhoff said.

A NATO statement described Melma as a "key affiliate of the Al Qaeda network" who was in contact with senior Al Qaeda members in both Afghanistan and Pakistan.

Troops surrounded Melma's house in Jalalabad city on Friday night and shot him dead when he emerged from the building holding an AK-47 assault rifle. Several other people were detained.

A guard at the house, Mohammad Gul, said a group of American soldiers scaled the walls of the compound around 11 p.m. and stormed the house, shooting Melma in the assault. Three others were detained, Gul said.

Melma had been detained for about five days in August, Gul said.

Melma is not the first former detainee to rejoin the insurgency. In 2009, the Pentagon said 61 detainees, or approximately 11 percent, released from Guantanamo had rejoined the fight. Experts have questioned the validity of that number.

About 520 Guantanamo detainees have been released from custody or transferred to prisons elsewhere in the world.

After the fall of the Taliban, Melma, 49, was given the rank of brigadier general and placed in charge of approximately 600 border security troops in Konar province, according to his military file made public by WikiLeaks.

He was captured in August 2002 while attending a meeting with U.S. military officials in Asadabad and transferred to the U.S. prison at Guantanamo Bay in October that same year. He was suspected of helping carry out rocket attacks against U.S. troops.

While imprisoned at Guantanamo Bay, the U.S. determined he was a "probable facilitator for Al Qaeda members" and was also thought to have links to Pakistan's intelligence service.

He was sent back to Afghanistan in September 2007.

NATO said in a statement that coalition forces have captured or killed more than 40 Al Qaeda insurgents in eastern Afghanistan this year.

In June 2010, then CIA Director Leon Panetta said only 50 to 100 Al Qaeda operatives continued to operate inside Afghanistan. It's not clear if Panetta was referring to commanders or foot soldiers.

In Kabul, meanwhile, a political standoff over the makeup of the legislature continued as police escorted a handful of new lawmakers into parliament despite protests from sitting parliamentarians that the new group is illegitimate.

Afghan election officials ruled last month that nine sitting parliamentarians should be replaced following a review of vote fraud allegations from last year's election.

More than 1,000 police were stationed around the parliament building Saturday in anticipation of violence, but the new lawmakers took their seats without incident, officials said. Saturday was the first day back at work after the Islamic holiday of Eid al-Fitr and many lawmakers had not yet returned from their home provinces.

The nine ousted parliamentarians were blocked from entering and vowed to continue to fight for their seats.

"This is a coup against the Afghan parliament and against democracy," said Mohammad Rafiq Shaher from Herat province, one of the ousted lawmakers.

And in the southern city of Kandahar, officials said NATO forces killed a child and a shopkeeper who were caught up in a firefight between a military patrol and a gunman. The attacker started shooting at the NATO troops and they returned fire, killing the two, said Sher Shah Yosufzai, the deputy police chief of Kandahar province.

He said he had reports that a NATO service member had also been killed in the fighting.

NATO said in a statement that one of its service members was killed in an insurgent attack on Saturday in southern Afghanistan but did not say if it was the same incident and did not provide any further details.