Ecuador’s president, Lenín Moreno, was assured by two British foreign secretaries that Julian Assange would not be extradited to a country where he could face the death penalty, according to letters seen by the Guardian.

Letters signed by the foreign secretary, Jeremy Hunt, and his predecessor Boris Johnson, dated 7 March 2018 and 10 August 2018 respectively, confirm a person cannot be extradited if they could face the death penalty, according to British legislation.

Assange tried to use embassy as 'centre for spying', says Ecuador's Moreno Read more

The letters appear to back up Moreno’s claim that he had written undertakings from Britain that Assange’s fundamental rights would be respected in his first interview with English-speaking media since the WikiLeaks founder was ejected from the embassy.

Assange is expected to fight extradition to the US over an allegation he conspired with former army intelligence analyst Chelsea Manning to break into a classified government computer. Sweden is also expected to decide whether to reopen an investigation into rape and sexual assault allegations against him.

When there are competing extradition requests in the UK, the home secretary decides which country should take priority.

The letters, which are virtually identical, read: “You have expressed concern that, should Julian Assange be extradited from the UK, there would be a risk that he could be subject to the death penalty. I can confirm that under UK law, a person’s extradition cannot be ordered if the person concerned will be subject to the death penalty.”

The letters go on to explain that the home secretary first must have received “adequate assurances from that country that the death penalty will not be imposed or carried out” if an extradition request is received from a country where the punishment is possible.

“There is further protection under UK law which is if the home secretary accepts an assurance as adequate, the person concerned may also seek leave to appeal to the high court, which will examine the assurance given,” the letters end.

Assange, 47, was taken from Ecuador’s London embassy by British police last Thursday after the country withdrew his political asylum, ending a stay of almost seven years.

He is charged by the US with one count of conspiracy to commit computer intrusion with Manning. He faces a maximum sentence of five years in prison if convicted, though he may yet face additional charges.

Assange may be most vulnerable to a prosecution relating to the 2017 publication by WikiLeaks of a set of hacking tools used by the CIA, according to legal analysts. A former CIA contractor, Joshua Schulte, has been charged with leaking the tools to WikiLeaks.

'Rude, ungrateful and meddling': why Ecuador turned on Assange Read more

In a third letter dated 3 April 2019, the British embassy in Quito assures the country’s foreign ministry in Spanish that Assange cannot be subjected to “inhuman or degrading punishment”, according the 1998 Human Rights Act under article three of the European convention on human rights, to which the UK adheres.

Ecuador’s decision to allow police to arrest Assange inside its embassy last week followed a tense and acrimonious period of deteriorating relations between the Quito government and the house guest whom its foreign minister, José Valencia, described as ungrateful, rude and unhygienic.

In a detailed 12-page letter seen by the Guardian, Valencia set out nine reasons to revoke the whistleblower’s asylum. The letter to Moreno is dated 10 April 2019 – a day before Assange was taken from the country’s London embassy.

Top of the list was Assange’s “reproachable conduct rather than showing gratitude”, his deteriorating health and the cost of his upkeep. Ecuador had spent more $5.8m on its guest’s security between 2012 and 2018 and nearly $400,000 on his medical costs, food and laundry, Valencia noted.