South Africa’s main opposition leader has been expelled from Zambia to prevent him from attending the treason hearing of his detained counterpart.
The decision was taken to ensure Mmusi Maimane did not put "undue pressure" on the judiciary, a Zambian diplomat said.
Mr Maimane said his expulsion showed Zambia was becoming a dictatorship.
He had planned to show solidarity with the southern African state’s main opposition leader, Hakainde Hichilema, during his court appearance on Friday.
A court is due to rule whether he should be tried for treason.
Mr Maimane was "aggressively confronted" by police when his plane landed, and he was "forcefully" prevented from entering Zambia, his Democratic Alliance (DA) party said in a statement.
The Zambian government’s behaviour was "shameful" and South Africa should lodge a diplomatic protest with it, the party added.
There has been mixed reaction in South Africa to Mr Maimane’s intervention in Zambia’s affairs, but many have applauded him for highlighting Mr Hichilema’s plight, reports the BBC’s Pumza Fihlani from the main city, Johannesburg.
Mr Hichilema was arrested in a raid by armed policemen on his home in Zambia’s capital, Lusaka, in April.
He was charged with treason after his convoy allegedly refused to make way for President Edgar Lungu’s convoy, while both were travelling to a ceremony in western Zambia.
Zambia’s top diplomat in South Africa, Emmanuel Mwamba, said Mr Maimane’s presence in court would have undermined "the sanctity, integrity and independence of the judiciary".
"It was imperative that the due process of the law was respected without undue pressure or interference," he told journalists.
Mr Maimane condemned the "trumped up" charges against Mr Hichilema and believed he was being unfairly prosecuted, the DA said.
Mr Hichilema has asked the court to throw out the charges, but the prosecution wants him to stand trial in the High Court.
Treason is a non-bailable offence in Zambia, with a minimum jail term of 15 years and a maximum sentence of death.
Last year, Mr Lungu narrowly beat Mr Hichilema in disputed presidential elections.