Honeymoon murder suspect Shrien Dewani has lost his High Court bid to block extradition to South Africa until he is fit to stand trial.
A panel of three judges, headed by Lord Chief Justice Lord Thomas, ruled that Dewani can be extradited - if the South African government gives a crucial promise.
Lord Thomas said extradition would not be "unjust or oppressive" if officials undertook to return Dewani to the UK if, after "a year or other stated reasonable period", mental illness still prevents a trial taking place.
A lawyer for the South African government said it was "delighted" with the court's ruling and expected it would be able to give the undertaking, but needed 14 days "for final clarification".
Referring to the fact that Dewani's wife Anni died over three years ago, Lord Thomas declared: " The interests of justice, including the interests of her family who like other families of murdered persons wish to see a trial take place as soon as is practicable, require expedition and that there should be no further delay, provided that proper protection is afforded to the appellant..."
Dewani, from Bristol, can still attempt to take his case to the Supreme Court, the highest court in the land, for a last-ditch appeal on the grounds that it raises legal questions of general public importance.
The court heard he suffers mental health problems, including depression and post-traumatic stress disorder and is compulsorily detained in hospital under the Mental Health Act.
He is accused of ordering the killing of his new wife Anni, 28, who was shot as the couple travelled in a taxi on the outskirts of Cape Town in November 2010.
His lawyers have stressed at various hearings that he will be willing to defend himself at trial once he is fit to do so, but they say he is unfit to plead under English law and his "prognosis is not certain".
Amit Karia, a first cousin to Anni, said on behalf of family members at London's High Court: "We are happy with the judgment. We have waited for it for three years, three months."
But he warned there was still a possibility that Dewani could launch another appeal and said: "We are always worried and don't take anything for granted."
He described the situation for Anni's parents as "immensely difficult - they do not have normal life any more".
He added: "They just want the truth. That is all we have ever wanted - just for Anni."
Today's ruling followed a hearing at the High Court last year. Those proceedings took place after an earlier decision that there were outstanding legal issues which needed to be decided.
Last July, chief magistrate Howard Riddle ruled at Westminster Magistrates' Court that Dewani should be extradited and rejected his attempt to stay in the UK for further hospital treatment.
He said Dewani was not fit to plead or stand trial at present, but there was evidence that he would receive the care he needed in South Africa.
Judge Riddle originally gave the go-ahead to Dewani's extradition in 2011 but had to reconsider the position after the High Court later allowed an appeal.
The High Court proceedings centred on two legal issues - the first relating to Dewani's status as ''an accused person'', and the second concerning whether it would be ''unjust and oppressive'' to extradite him ''regardless of the prognosis'' of his mental condition.
The judges ruled that he was an accused person capable of being extradited under the provisions of th e Extradition Act 2003, even if at the time of extradition he was unfit to be tried.
But Lord Thomas, sitting with Mr Justice Ouseley and Mr Justice Blake, said it would be unjust and oppressive to return Dewani without an undertaking.
He ruled the undertaking would be that "in the event of the appellant (Dewani) being found unfit to be tried, he will be free to return to the UK, unless there is found to be a realistic prospect of his being tried with a year - or other stated reasonable period - of that finding and the trial takes place within the period".
Lord Thomas continued: "In any event the appellant must be free to return in the event a court in South Africa, having found him unfit to be tried, embarked on the process of determining under the Criminal Procedure Act 1977 whether he did the act."
So far three men have been convicted over Mrs Dewani's death.
South African Xolile Mngeni was convicted of premeditated murder for shooting her. Prosecutors claimed he was a hitman hired by Dewani to kill his wife, which Dewani has consistently denied.
Taxi driver Zola Tongo was jailed for 18 years after he admitted his part in the killing and another accomplice, Mziwamadoda Qwabe, also pleaded guilty to murder and was handed a 25-year prison sentence.