The U.S. Embassy identified one of the men detained Monday in a raid in Kabul as Jonathan K. Idema, a purported former Green Beret who claims to have links with Afghan militia forces.
The American military has warned that Idema had been posing as a U.S. military or government employee.
Interior Minister Ali Ahmad Jalali said the three men had, along with four Afghans also arrested Monday, "formed a group and pretended they were fighting terrorism."
"They arrested eight people from across Kabul and put them in their jail," Jalali said at a news conference.
Another Afghan security official, speaking on condition of anonymity, said intelligence and police officials found the prisoners hung by their feet.
"They were hanging upside down," the official said on condition of anonymity. The official said reports on the case showed that the men were beaten, though he had no details.
Jalali said the eight were released. They weren't identified.
Jalali described the group as "rebels" with no "legal link" to any Afghan or other authorities.
Still, the intelligence official said the three foreigners were wearing uniforms that appeared to be from the U.S. military and were armed with assault rifles.
Idema, described in media reports as an ex-special forces soldier in his 40s, cropped up in Afghanistan in the winter of 2001 when U.S. and allied Afghan forces routed the Taliban.
He offered his services to Western TV networks, including a videotape showing a purported al Qaeda training facility near Kabul, and later featured in a top-selling book called "The Hunt for Osama bin Laden."
Afghan police and intelligence officers seized the men Monday in downtown Kabul. Jalali said the men were operating in Kabul under the guise of working for an export company.
The security official denied reports that shots were fired in the raid. He said security forces had been trailing the men and caught them by surprise.
Uniformed Afghan intelligence officers shooed reporters away from a freshly painted green house in the city's Kart-e-Parwan district Thursday.
Only the second story was visible over a high wall topped with barbed wire. There were no signs on the outside to suggest who lived there.
Two shopkeepers and a man who lived in the next street said they had noticed foreigners living in the house, but had noticed nothing suspicious.
The U.S. military took the unusual step on Monday — before news of his detention was widely known — of distancing itself from Idema, who "allegedly represented himself as an American government and/or military official."
"The public should be aware that Idema does not represent the American government and we do not employ him," the statement said.
A spokeswoman would give no details of his activities, insisting that Afghan authorities are leading the investigation.