Zambian opposition leader Hakainde Hichilema was released from prison Wednesday and the treason charges against him were dropped shortly before his trial was to begin in Lusaka.
Mr Hichilema has been in custody since April over an incident in which he allegedly failed to give way to President Edgar Lungu’s motorcade.
His trial, which was due to begin during the morning, had threatened to rock a country known for its relative stability.
“Hakainde Hichilema and his 5 co-accused have been released from prison with the treason charge dropped,” the United Party for National Development (UPND) said in a statement.
Lillian Kayuni, Director of Public Prosecution, told the court she would be “entering a nolle prosequi” — a formal notice of abandonment.
President Lungu, who narrowly beat Mr Hichilema in last year’s presidential election, has dismissed allegations of growing authoritarianism and has accused his rival of trying to overturn the election result.
Mr Hichilema and five aides denied the treason charges at a plea hearing on Monday where police officers in riot gear had sealed off the court precinct as scores of UPND supporters waited outside.
Zambia has enjoyed relative stability since its first multi-party election in 1991.
But last year’s election was marked by clashes between supporters of Mr Lungu’s Patriotic Front (PF) party and the UPND.
Mr Hichilema, 55, says the election was rigged and has refused to recognise Mr Lungu as the president of Zambia.
In June, parliament suspended 48 UPND lawmakers for boycotting an address by the president three months earlier.
And last month, President Lungu invoked a state of emergency, increasing police powers of arrest and detention after a series of arson attacks blamed on opposition parties.
The government has also increased pressure on media outlets that support the opposition, eroding Zambia’s reputation as a stable democracy.
Mr Hichilema was arrested after he allegedly put Mr Lungu’s life in danger when his convoy failed to make way for the presidential motorcade in a high-speed road drama caught on video camera.
The two men were both travelling to Western province for a traditional ceremony.
Days later, more than 100 armed police surrounded Mr Hichilema’s house outside Lusaka, firing tear gas before detaining him and his aides.
The businessman turned politician has claimed he was assaulted by police during his arrest and suffered mistreatment in detention.
Treason is an offence in Zambia that carries a minimum 15-year jail-term and, in theory, a maximum sentence of death.
A person accused of treason is not allowed to post bail.
When he was arrested, Amnesty International said Mr Hichilema and the five other accused were “victims of longstanding persecution” by authorities and faced charges designed to “harass and intimidate”.
President Lungu did not mince words during the election campaign, warning political rivals and activists that “if they push me against the wall, I will sacrifice democracy for peace”.