Ecuador has received written assurances from the UK government that it would not to extradite Julian Assange to any country where he would face the death penalty, the country’s president, Lenín Moreno, has said.

In a live radio interview on Thursday, Moreno said that the WikiLeaks founder now had sufficient guarantees to leave Ecuador’s embassy in the UK, where he has lived under asylum since mid-2012.

Moreno told journalists he was talking to the UK government so it would “guarantee his life, and guarantee he wouldn’t be extradited to any country where his life would be in danger”. He added the UK would require Assange to complete a short jail term for breaching bail conditions.

The announcement comes as speculation mounts that the Australian activist’s six-year stay in the London embassy could be coming to a close. The appointment of a new ambassador, Jaime Marchán, in the London embassy this week is a sign that the government wants to resolve the problem, according to analysts in Quito.

Pressure has been mounting on the WikiLeaks founder since Ecuador cut his internet connection in March and the Guardian reported that the country had spent millions on his extended stay.

“I don’t like Mr Julian Assange’s presence in Ecuador’s embassy,” Moreno said on Thursday, without saying the activist would be forced out. He added that the Australian had spent “too much time almost imprisoned” in the country’s embassy.

Opinion polls show most Ecuadorians want Assange to leave the embassy, and Moreno is under pressure at home and from the US to end the unwanted house guest’s stay.

“Ecuadorians have a long tradition of respect for human rights,” Fabricio Villamar, an MP for the opposition Creo party, told the Guardian.

“But that tradition cannot be interpreted as a weakness or as a loophole for people who are being pursued by ordinary justice,” he added.

In October, Ecuador imposed stringent new house rules for Assange to which he responded with an action against the embassy for “violating his fundamental rights and freedoms”. An Ecuadorian judge rejected the legal move.

Assange’s legal team has said it is considering how to respond, according to the Associated Press.

US authorities have never officially confirmed that they have charged Assange, but last month a mistake in a document filed in an unrelated case hinted that criminal charges may have been prepared in secret.

The court filing, submitted apparently in error by US prosecutors, mentioned criminal charges against someone named “Assange” even though that was not the name of the defendant.

Legal analysts said the error was likely to have been caused by prosecutors copying and pasting from sealed documents outlining charges against the WikiLeaks founder.

The Foreign Office did not deny a previous news report last month suggesting the Home Office had given written assurances to the Ecuadorian government that UK ministers would not allow Assange’s extradition to a country where he would face the death penalty.

It is not clear if this assurance amounts to a commitment that the UK will not allow Assange’s extradition to the US at all – or whether it would allow extradition on condition that he would not face the death penalty.

It is understood that the UK has also given assurances that Assange would not face more than six months in jail for related bail offences.

Earlier this year, the Foreign Office minister, Alan Duncan, tried to reassure Assange about his treatment if he chose to leave the embassy, telling MPs: “We are increasingly concerned about his health.

“It is our wish that this is brought to an end, and we would like to make the assurance that if he were to step out of the embassy, he would be treated humanely and properly. The first priority would be to look after his health, which we think is deteriorating.”