Reed Brody, a war crimes prosecutor attending the trial, said Ousman Sonko was convicted of intentional homicide, torture and false imprisonment and acquitted for rape.
The ruling, by the Swiss Federal Criminal Court in Bellinzona, can be appealed.
Sonko, Gambia's former interior minister, is the highest-ranking official ever to be tried in Europe using universal jurisdiction which allows the most serious crimes to be prosecuted anywhere.
Sonko has been in Swiss custody ever since his arrest in January 2017 after applying for asylum following his sacking from the West African nation's government.
His lawyers had argued for his acquittal during the trial in Bellinzona and demanded financial compensation for the years spent in detention.
Trial International, a non-governmental organization focused on fighting impunity for international crimes, filed the complaint leading to the arrest of the former Gambian authority.
The NGO took to social media platform X, formerly known as Twitter, to announce that Sonko "has been sentenced by the Swiss Federal Criminal Court to 20 years in prison for crimes against humanity."
Benoit Meystre, Trial's legal advisor spoke to French media outlet, Agence France-Presse, AFP, prior to Sonko's guilty verdict. He said the NGO "observed (with) great relief on the part of the complaining parties to have been present, to be able to confront Ousman Sonko and to see how he reacted to what they said."
"Some also told us that the role they played in the trial contributes to their healing, regardless of the verdict that will be rendered," Meystre added.
Jammeh, Gambia's former dictator ruled the West African nation with an iron grip from 1994 to 2016.
Sonko was accused by Swiss prosecutors of "having supported, participated in and failed to prevent systematic and generalized attacks as part of the repression carried out by the Gambian security forces against all opponents of the regime."
The charges included nine counts of crimes against humanity.
Sonko's lawyers argued that he should not be tried for crimes against humanity because the alleged offenses were isolated acts and acts for which they said he bore no responsibility.
Philippe Currat, Sonko's legal representative said, "there is no systematic nature, and the small number of victims for each episode, taken separately or in total, does not reach the threshold required to consider that it could be a generalized attack."
Furthermore, "we have demonstrated that the abuses committed against the victims are not attributable to Ousman Sonko," but instead to the National Intelligence Agency and the Junglers paramilitary group, "which have never been under his authority or under his effective control," Currat said.
Sonko’s trial took place under the principle of universal jurisdiction, which allows countries to prosecute alleged crimes against humanity, war crimes and genocide regardless of where they were committed.
His lawyers argued that he should not be tried on any counts predating 2011 when universal jurisdiction came into force in Switzerland.
Reed Brody, a member of the International Commission of Jurists who works with Jammeh's victims and who followed the Swiss trial said the outcome of the case gave "added impetus to the home-grown efforts in The Gambia to prosecute the worst crimes of the Yahya Jammeh regime, which, after long delays, are finally accelerating."
In 2022, Gambian authorities endorsed the recommendations of a commission that investigated the atrocities perpetrated during the Jammeh era.
The West African nation's lawmakers agreed to prosecute 70 people, starting with Jammeh, who went into exile in Equatorial Guinea in January 2017.
And in April, the Gambian parliament passed bills to establish the Office of the Special Prosecutor to prosecute cases identified by the commission and provide for a special court.
Some information for this article was sourced from Reuters and Agence France-Presse.
Forum