Shrien Dewani allegedly told a gay escort that he wanted a “way out” of his marriage months before his wife was murdered on honeymoon.

Anni Dewani, 29, was shot dead in Cape Town, South Africa, in November and local police believe her husband arranged for her to be killed by hitmen.

Mr Dewani, a millionaire businessman, is wanted by South African police. Yesterday, an extradition hearing heard that he had told a witness that he “needed to find a way out” of the marriage, Press Association reports.

Reports named the witness as as male escort Leopold Leisser, 39, who is German. Mr Leisser has previously claimed that the British businessman had paid him thousands of pounds for sex on three occasions.

Representing the South African authorities who are seeking Mr Dewani’s extradition, Hugo Keith QC, said: “Dewani told [the witness] in April 2010 how he was engaged and had to get married.

“He said although she was a nice, lovely girl who he liked, he could not break out of the engagement because he would be disowned by his family. He went on to say to the witness he needed to find a way out of it.”

Yesterday’s hearing at Belmarsh Magistrates’ Court was also told that the gay rumours surrounding Mr Dewani would place him in danger of sexual assault and attack in a South African prison.

Sasha Gear, from Johannesburg’s Centre for the Study of Violence and Reconciliation, said that the suspect’s youth and criminal inexperience would result in other inmates attacking him.

She added: “The connections that have been made with homosexuality put him at additional risk. Inmates perceived to be gay are very vulnerable in prison and allegations of homosexuality or association of him with homosexuality put him at risk.”

Mrs Dewani was initially thought to have been killed in a hijacking. Her husband and their taxi driver Zola Tongo escaped unharmed.

Tongo has been sentenced to 18 years in jail for his part in the death. His sentence was reduced from 25 years after he implicated the British businessman in the killing.

Mr Dewani, who has been diagnosed with post-traumatic stress disorder, is living in a secure mental health hospital in Bristol where he is on bail.

He strenuously denies being gay or having anything to do with his wife’s death.