Three Americans have been jailed for up to 10 years for torturing Afghans and running a private jail in Kabul.
The three Americans were arrested in a Kabul house in July
Jonathan Idema and Brent Bennett were sentenced to 10 years in jail and Edward Caraballo eight years.
Idema, who the US calls a bounty hunter, said his work had been approved by Afghan and US authorities. He told the court the FBI was setting him up.
Four Afghans working with the Americans were also found guilty and sentenced to between one and five years in jail.
Idema said after the trial: "I apologise that we tried to save these people... We should have let the Taleban murder every... one of them."
The judge said the defendants, who were arrested in Kabul in July, had the right to appeal.
A lawyer for Idema, John Edwards Tiffany, said an appeal would be launched.
Lawyers for the American defendants had called for the charges to be thrown out, arguing that the Afghan legal system was not fit to try them.
The defendants denied charges of kidnapping, torture and illegal entry into Afghanistan.
The BBC's Andrew North in Kabul says the verdict was a sensational end to what has often been a sensational trial.
He says Idema, who claimed to have tracked down one hiding place of Osama Bin Laden, had failed to prove his actions had been sanctioned by Washington.
Idema had taken the stand on Wednesday and was applauded from the public gallery as he swore "in the name of Allah to tell the truth and nothing but the truth".
He said he had been given a passport by an unnamed American agency and had a visa similar to those owned by US special forces.
He did not elaborate on his allegations against the FBI.
The trial has been marred by scenes of chaos, and repeated objections from the defence. Little strong evidence has been presented.
Wednesday's proceedings were reportedly the most orderly yet.
The prosecutor, Mohammed Naim Dawarty, accused the defendants of opening private cells, abducting and torturing Afghan people and seizing their property.
He said their activities "have created distress of the people of Afghanistan, the government and the United States".
Defence lawyer Robert Fogelnest had called for an end to the trial because the Afghan legal system was unfit to carry it out.
Judge Abdul Baset Bakhtyari rejected the plea, saying: "Come to the point if you have any arguments."
The judge did allow the defence to show a video of the men apparently being greeted upon arrival in Afghanistan by several Afghan officials, including the Kabul police chief.
"It's ridiculous to claim they entered illegally under these circumstances," Mr Fogelnest said.
The video also showed one of the Afghans detained by the men confessing to plotting to kill senior Afghan leaders and bomb the US military base in Bagram, north of Kabul.
During his trial, Idema alleged that hundreds of videos, photos and documents were removed by FBI officers after his arrest in Kabul.
He said the documents would prove that "while we were not in the United States army, we were working for the United States army".
The Pentagon denies any ties with the men.
The three defendants were arrested when Afghan security forces raided a house in Kabul being used as a private jail and containing eight Afghan prisoners.