TUNIS, Tunisia (AP)— A man linked by officials to the attack on the U.S. consulate in Benghazi has been conditionally released by a Tunisian judge due to lack of evidence, his lawyer said Tuesday.

The release of Ali Harzi, a 26-year-old Tunisian, appears to represent a blow to the investigation of the Sept. 11 attack on the consulate in Libya that killed the U.S. ambassador and three other Americans. The investigation in Libya itself has been stalled due to the weak central government in the face of the powerful militias, some of whom may have been involved in the attack.

Harzi was one of very few people in custody in relation to the attack. U.S. officials said in December that Egypt had also arrested a member of the Islamic Jihad group for possible links to the attack, but in general they lamented a lack of cooperation from local governments in their investigation and said most suspects remained free.

Harzi’s lawyer, Anwar Oued-Ali, said the presiding judge had “conditionally freed” his client Monday night and he has to remain in the greater Tunis area in case the court needs him. The lawyer described the release as “correcting an irregular situation” because authorities never had any real evidence.

Harzi was originally detained in Turkey and in October was extradited to Tunisia, where authorities had said he was “strongly suspected” of being involved in the attack. His lawyer said he was officially charged with “membership of a terrorist organization” – a charge punishable by six to 12 years in prison.

In December, FBI officials questioned Harzi for three hours in the presence of a Tunisian judge.

The FBI has not commented on the results of the questioning, but Harzi’s lawyer said they just asked if his client had any information about the attacks on the Benghazi consulate as well as the assault on the U.S. embassy in Tunis three days later.

U.S. intelligence has blamed the Benghazi attack on militants who are members of a number of different groups. They range from the local Libyan militia Ansar al-Shariah, whose members were seen at the U.S. consulate during the attack, to militants with links to al-Qaida in the Islamic Maghreb – al-Qaida’s leading representative in the African region. The consulate’s cameras captured many of the faces of armed men in a mob, and some have been questioned, but most remain free.

Authorities in the region have not yet arrested many of the suspects the U.S. wants to question about the attack according to U.S. officials.

In Libya especially, investigating the attack is difficult because authorities rely on the numerous militias made up of tens of thousands of young Libyans who took up arms against former leader Moammar Gadhafi. It is often difficult to draw clear lines between those providing security and those causing instability.

In a recent TV interview, Harzi’s father, Tahar, said his son was just working in Libya in construction supporting his family.

Both Ali and his brother, Brahim, have had brushes with the law before, however. In 2005 the two were sentenced to 30 months in prison for having contact with another brother, Tarek, who fought against coalition forces in Iraq, according to lawyer Oued-Ali.

The father acknowledged that he had encouraged his sons to take up “jihad in the cause of God.”