When a commercial flight brings him back to Britain on Wednesday, Shrien Dewani will be a free man at last, cleared by a South African judge of ordering the killing of his young bride on their honeymoon.

But the once high-flying British businessman has paid a heavy price for his four-year ordeal, which included a lengthy extradition procedure and a trial in South Africa that ended abruptly this week when a judge dismissed the charges because she found the prosecution's case unconvincing.

It has been a dramatic fall from grace for a man who seemed in 2010 to have every material comfort, including the fruits of a successful career and a beautiful bride whom he married in a storybook setting.

His is a story of how a person can triumph in a legal sense — no charge against him has been proved — but still lose almost everything, including his privacy and reputation.

Not only has he suffered medical and mental problems — including what may have been a suicide attempt — but he has seen his penchant for male prostitutes become fodder for newspapers around the world, and endured the publication of intimate text messages he exchanged with his wife, Anni, in the days before her killing at age 28.

Dewani, 34, has at times been confined to a psychiatric hospital with mental illness and severe depression that slowed his return from Britain to South Africa to face charges. And he still faces possible civil lawsuits from his dead wife's furious family who do not accept the judge's decision to cut the trial short. They say they will only be happy when Dewani is cross-examined under oath and forced to explain what really happened to his bride.

There are two versions of her killing: Prosecutors argued that Dewani, uncomfortable in his marriage, perhaps because of his bisexuality, paid for his wife to be shot dead during a staged carjacking in a deprived Cape Town township. Dewani maintains it was instead a bona fide carjacking that turned violent, like so many in South Africa.

"We just want to know the truth," Ashok Hindocha, Anni Dewani's uncle, told The Associated Press from his home in Sweden. "We are devastated. We did not expect this. The least we expected was to hear the full story, complete story."

He said the family is studying its legal options to bring more actions against Dewani, who is expected to return to his home city of Bristol, in southwestern England, after landing early Wednesday. One option being studied is bringing legal action against Dewani in Britain.

Shrien and Anni Dewani married in Mumbai, India, in October 2010, in a ceremony that was elaborate even in a country known for its colorful weddings. Pictures show them in fancy garb: Shrien resplendent in jeweled turban and flowing orange scarf, Anni in a spectacular wedding dress and flashing a wide smile.

The pictures looked like touchstones of what would be a long, happy life together. But subsequent events suggest the wedding smiles masked tension.

Text messages made public during the trial suggest a tempestuous relationship — sometimes passionate, sometimes bitter — with Anni expressing fears that Shrien didn't really want to be married.

Dewani said in his court statement that his marriage was solid despite occasional quarrels. He admitted consorting with male prostitutes before the marriage and surfing gay websites, and characterized himself as bisexual.

The prosecution argued that Dewani's unhappiness with being married led him to plot his wife's murder — and pay for it — with the help of the taxi driver he met when the newlyweds landed in Cape Town for their South African honeymoon.

But the taxi driver, Zola Tongo — who had already been convicted for his role in Anni Dewani's muder — proved an unconvincing witness, undermining the prosecution case. Without that link, the prosecution theory proved porous, opening the way for Dewani to fly home to Britain — just eight months after he was extradited to face trial.

He hasn't spoken since his release, and his mental state isn't clear.

He has friends and family waiting for him in Bristol, and a business to return to, but the notoriety of the case will be hard to shake.

"It's going to be very tough for Anni's family, but he's been found innocent so you have to go by what the law states," said company director Colin David, 51, of Bristol. "If he's coming home, it's the right and proper thing. I just hope that he can get over his mental issues and get on with life."

___

Associated Press journalist Martin Benedyk in Bristol contributed to this report.