(CNN) -- Afghan and coalition forces killed an insurgent leader with links to al Qaeda in eastern Afghanistan, NATO officials said Saturday.
The man was identified as Sabar Lal Melma, whom NATO officials described as an insurgent leader responsible for organizing attacks and financing operations in the volatile Kunar province.
A local tribal leader said the man was a former Guantanamo detainee, and a senior Afghan official added he had been detained in Afghan custody within the last month but was released after Afghan officials lobbied he was innocent.
Melma was released from the U.S. Navy's detention facility at Guantanamo Bay, Cuba, in 2007 after being held for nearly five years, said Haji Sahib Rohullah Wakil, a tribal elder in Kunar.
Wakil said he was detained at Guantanamo with Melma.
Melma was killed Friday during operations near the Pakistani border, according to a NATO news release.
A NATO spokesman could not confirm whether Melma was the former detainee.
"It is fair to say he was clearly linked to al Qaeda," said Capt. Justin Brockhoff, a spokesman for the NATO-led International Security Assistance Force.
"He was responsible for many attacks and finance in the Pech Valley, Kunar province. He was in contact with senior al Qaeda figures in Kunar and Pakistan."
ButWakil, the tribal elder, disputed Mamel was working as an insurgent.
"After he was released from Guantanamo, he chose a civilian life and was running his own business," Wakil told CNN.
Afghan and NATO troops were tipped to Melma's whereabouts and tracked him to a building in a compound in Jalalabad District in Nangarhar province, it said.
When Afghan and NATO forces attempted to arrest him, he emerged from the building with an AK-47 and was killed, NATO said.
Several suspected insurgents were taken into custody at the compound, the NATO statement said.
There was also confusion over Melma's recent past. One senior Afghan official said Melma had been in the custody of the Afghan intelligence services within the last month but was released after pressure from Afghan officials.
Muhammad Masoon Stanekzai, the secretary of the Afghan government's peace commission, responsible for reconciliation with militant groups, said: "The intelligence service did not find anything that could prove to detain him and that is why we all worked for his release. Sabir Lal was living right in the center of Jalalabad city, did not pose any threat and was found innocent."
The police chief of the area where Melma was accused of assisting the insurgency, the Pech Valley in Kunar, said he did not believe Melma was linked to al Qaeda.
"I do not have very much information about Sabir Lal and his affiliation to al Qaeda," Haya Gul told CNN by telephone. "We have not seen or heard any bad activities of him in our district."
Lt. Col. Jimmie Cummings, an ISAF spokesman, said: "We have seen those reports and are looking into the background of this individual."
Asked about the claims he had recently been in detention, he said he had no information on this issue. He reiterated Melma had insurgent links and that he had been shot because he was carrying an AK-47.
A total of 171 men still remain in detention at Guantanamo, including those awaiting prosecution and those deemed too dangerous to release but not feasible for prosecution. During the Bush administration, 537 detainees were transferred, including almost 200 to Afghanistan.
Most of the 171 remaining prisoners at Guantanamo have been rated as a "high risk" of posing a threat if released without adequate rehabilitation and supervision.
But, according to The New York Times -- one of several news organizations that saw the WikiLeaks files -- an even larger number of the prisoners who left Cuba were also designated "high risk" before they were freed or passed to the custody of other governments.
Among those released from Guantanamo was a man by the last name of Melma, according to the documents published by The New York Times.
The documents, which included transcript of court hearings, said Melma denied allegations that he was an associate of al Qaeda or that he ever attacked NATO-led forces.
He said he fought for the Northern Alliance against the Taliban, and even helped American troops, the documents said.
Melma, according to the documents, was returned to Afghanistan in September 2007.
CNN's Nick Paton Walsh, Ruhullah Khapalwak and Chelsea J. Carter contributed to this report.