Banjul - Gambian opposition leader Ousainou Darboe, who was jailed in July for taking part in a protest, was freed on bail with 18 others on Monday, days after a shock opposition election win.
Thousands of supporters descended onto the streets leading to the capital, Banjul, to welcome back a popular elder statesman who has been in a cell in the notorious Mile Two prison since his April arrest.
Ousainou and the others took part or were picked up near a demonstration in April over the death in custody of Solo Sandeng, a fellow member of the United Democratic Party (UDP), who had taken to the streets to demand electoral reform.
Judges handed down the much-awaited ruling three days after an opposition coalition took a surprise victory in a presidential election that will see businessman Adama Barrow take over from President Yahya Jammeh after 22 years in office.
Waiting for him to arrive home in the suburb of Westfield, Darboe's wife Maimuna was clear the change of government had influenced the court.
"Justice has finally taken its course so I am very happy, because he has been denied several times but now there's a government change they have no choice," she told AFP.
The head of his defence team said it was a sign of The Gambia following its first transfer of power by the ballot box last week.
"This ruling by the court is a vindication of the country's democratisation process, which has begun," defence lawyer Atoumane Gaye said.
Gaye referred to the new government several times during court proceedings, telling judges the government "was going to need advice on a lot of things" from Darboe.
The UDP is one of eight political organisations represented in the coalition.
The appeal of the 19 UDP members against their three-year sentences continues, but Gaye said he hoped that by January - the deadline for the coalition president to take power - they would be definitively released.
Gaye said the decision could herald a new era for independent courts in the country, which have long been seen as an instrument of Jammeh to prosecute his critics.
Speaking to journalists prior to the ruling, the slight, elderly Darboe said he bore no grudge against Jammeh.
"I think he is someone who has done his bit," Darboe said, referring to the leader's long rule.
"I have respect for him as the president of this country and I would never address him as a crazy man and I would never address him as an evil man," he added.
He was defiant, however, saying that "what I did was not against the law."
Supporters were ecstatic to see Darboe freed and milled around his home.
"He is a hero in Gambian politics," said supporter Foday Darboe. "He's the Nelson Mandela of Gambia."
Human Rights Watch hailed "an important first step in demonstrating improved respect for the rule of law", while Amnesty International said it hoped the ruling would lead to a full acquittal.
President-elect Barrow has pledged to rejoin the International Criminal Court and the Commonwealth, both institutions which Jammeh railed against and withdrew the country from, to the dismay of many.
His coalition will govern for three years with Barrow as its figurehead, after which elections will be held and he will step down in line with a memorandum signed by all the parties involved.