South Africa's President Jacob Zuma must face charges of corruption, fraud, racketeering and money laundering, the Supreme Court of Appeal has ruled.
It agreed with a lower court ruling last year that prosecutors could bring back 783 counts of corruption relating to a 1999 arms deal.
The charges had been set aside eight years ago, enabling Mr Zuma to become president.
The president has always maintained his innocence.
In a statement, Mr Zuma's office said the ruling was "disappointing", but anticipated.
The president now expected South Africa's National Prosecuting Authority (NPA) to consider representations from his legal team before making a decision about whether to prosecute him, it added.
The charges relate to Mr Zuma's relationship with a businessman, Shabir Shaik, who was tried and found guilty in 2005 of soliciting bribes from a French arms company "for the benefit of Zuma".
Mr Zuma and other government officials have been accused of taking kickbacks from the purchase of fighter jets, patrol boats and other arms.
Charges were first brought against Mr Zuma in 2005 but dropped by prosecutors in 2009.
Last year, the High Court in the capital, Pretoria, ruled in a case brought by the opposition Democratic Alliance that he should face the charges.
Mr Zuma went on to lodge a challenge with the Supreme Court of Appeal.
Analysis: 'Spy tapes' appeal
By Andrew Harding, BBC News, Johannesburg
It is the corruption case that will not go away.
President Zuma has battled for years to avoid going on trial for 783 counts of corruption, linked to a politically charged bribery scandal that stretches back to the 1990s.
The case against him was dropped in controversial circumstances in 2009, when the security services produced recordings of phone conversations that apparently show there was "political meddling" by prosecutors.
Weeks later, Mr Zuma became president of the country.
But the so-called "spy tapes" have never been made public, and opposition parties have fought in the courts to have the corruption charges reinstated.
After this appeals court ruling, that could now happen - in theory.
In practice, many believe South Africa's NPA is unlikely to proceed, at least not without further delays.
Mr Zuma's presidential term ends in 2019, when he will not be eligible to stand in another election having already served two terms in office.
His eventful presidency has seen him survive eight votes of no-confidence, making him the most colourful and controversial president South Africa has had since white-minority rule ended in 1994.