A little over a week ago, British academic Matthew Hedges was preparing for what would be his fourth court appearance in the United Arab Emirates on charges of spying for the UK government.

He had already spent five months in solitary confinement, during which time he was denied access to a lawyer, reportedly fed a cocktail of medication and saw his mental and physical health deteriorate dramatically.

At the same time, Baroness Rona Fairhead, UK Minister of State for Trade and Export Promotion, was addressing a petroleum conference in Abu Dhabi aimed at drumming up trade between the two countries.

“There is a strong desire in the UK to look outside more to markets that we have not tapped before,” she said at the event, at which a British delegation had a pavilion.

Baroness Fairhead added that the size of the UK’s stall at the conference showed “how important our presence in the UAE is for us".

The event was just the latest effort in a drive by the UK government to build trade relationships outside of the European Union in preparation for Britain’s exit from the bloc.

But the sentencing of 31-year-old Mr Hedges has exposed an awkward truth at the heart of the UK’s push to become a global trading power: to make up for the loss of trade that will inevitably follow Brexit, it will be forced to do more business with states that abuse human rights.

Mr Hedges, a student at Durham University who went to the country to research his PhD thesis, was sentenced to life in prison at an Abu Dhabi court on Wednesday in a hearing that lasted less than five minutes, and with no lawyer present.

His troubles began when he was detained in May at Dubai airport as he was leaving the country following a research trip. During five months in solitary confinement he was interrogated without a lawyer or consular access and “fed a cocktail of medication by the prison guards,” according to a family representative.

Reacting to the verdict, Foreign Secretary Jeremy Hunt warned of "serious diplomatic consequences." But throughout Mr Hedges’ detention UK ministers were meeting with UAE officials in an effort to boost trade.

In September, while Hedges was still being held in solitary confinement, Liam Fox, Secretary of State for International Trade, met with Sheikh Abdullah bin Zayed Al Nahyan, the UAE’s Minister of Foreign Affairs and International Cooperation. Mr Fox tweeted that the meeting covered the “strong Trade & Investment links between our countries.”

The next month, after Mr Hedges’ wife, Daniela Tejada, had issued warnings about her husband’s health, Britain's Minister for the Middle East Alistair Burt attended a meeting with UAE ministers to discuss trade and “further the diverse UK-UAE relationship.”

UK has long given the impression that security and trade interests trump human rights concerns in the UAE Polly Truscott, Amnesty International UK's foreign affairs expert

Both Mr Burt and Mr Hunt said they took up the Brit’s case with UAE officials during meetings, but Mr Hedges’s wife accused the UK Foreign and Commonwealth Office of "stepping on eggshells instead of taking a firm stance" on Thursday.

"I was under the impression they were putting their interests with the UAE above a British citizen's rightful freedom and welfare," she told BBC Radio 4's Today programme on her return from the UAE.

The UAE has long been a destination for British investment, and trade has been increasing in recent years. The UK is the biggest foreign direct investor in the country. Total trade between the two countries rose by 12 per cent in 2017, to £17.5 billion. UK exports meanwhile were £11.1 billion. More than 120,000 Brits live and work in the UAE, and close to a million British tourists visit every year.

But in the wake of Mr Hedges’ sentencing, the government is facing calls to reevaluate that relationship.

Polly Truscott, Amnesty International UK’s foreign affairs expert, said the UK has “long given the impression that security and trade interests trump human rights concerns in the UAE.”

“With Matthew Hedges’ case, it almost seems to have come as a surprise to the government that the UAE actually locks up people after deeply unfair trials,” she told The Independent.

“Matthew is just the latest person to experience the appalling injustice of a sham Emirati trial – local human rights activists, political critics and even Emirati judges and lawyers have all been convicted in similar circumstances.

Chris Doyle, Director of the Council for Arab-British Understanding, said “the foreign secretary has stated that there will be serious diplomatic consequences, but we have no idea what that means as yet.”

“It must be more than words or else Britain will not be taken seriously, not just by the UAE but by other states. If those diplomatic consequences and pressures do not yield results, and very soon, Britain must consider non-diplomatic measures,” he told The Independent.

The Department for International Trade declined to answer a query from The Independent about whether the case would impact trade relations between the two countries.

UAE attorney general Hamad al-Shamsi said Mr Hedges was accused of “spying for a foreign country, jeopardising the military, political and economic security of the state”.

Mr Hedges has denied the charges, and maintains that he was in the country to research the impact of the Arab Spring on the UAE’s foreign policy.

Foreign secretary Jeremy Hunt warns UAE of 'serious consequences' over Matthew Hedges jailing

The Hedges case is not the first time the UK has been forced to defend its trade relationships in recent months.

The murder of journalist Jamal Khashoggi in the Saudi consulate in Istanbul in October sparked renewed pressure on the government to halt arms sales to Riyadh, which is currently fighting in Yemen.

Saudi Arabia intervened in Yemen three years ago after Houthi rebels took over much of the country and forced out the internationally recognised government of President Abdu-Rabbu Mansour Hadi.

If those diplomatic consequences and pressures do not yield results, and very soon, Britain must consider non-diplomatic measures Chris Doyle, Director of the Council for Arab-British Understanding

At least 6,660 civilians have been killed, according to the United Nations, most of whom were victims of coalition airstrikes. Coalition jets, backed by US logistical support and using weapons made in the US and the UK, have repeatedly hit targets where no militants were present.

The UK has sold more than £4.6 billion in arms to Saudi Arabia since the conflict began in 2015.