The US agreed to not seek the death penalty against Julian Assange in a back-channel negotiation with Ecuador to get him evicted from the South American country’s London embassy, a report said Monday.

The Ecuadorian ambassador to Germany struck the deal with US-German ambassador Richard Grenell about six months after the country decided it would try to evict the WikiLeaks founder in March 2018, ABC News reported, citing an unnamed official with knowledge of the negotiation.

Because Ecuador strongly opposes the death penalty, it wanted an assurance from the US that Assange would not face capital punishment if he was extradited to America.

After Grenell met with the Ecuadorian ambassador, he notified the State Department about the request, according to the report.

Deputy Attorney General Rod Rosenstein then verbally agreed to the request, ABC News reported.

Assange hid in the embassy for about seven years to avoid extradition to Sweden, where a woman claims he sexually assaulted her.

Police dragged him from the building last week and arrested him on two warrants from the US and the UK.

The US warrant was issued in December 2017 and is related to his alleged conspiracy with Chelsea Manning, a former Army intelligence analyst who leaked a slew of classified materials to WikiLeaks.

The UK warrant is related to bail jumping in 2012, when he sought political asylum at the Ecuador embassy to avoid being extradited to Sweden, which was probing him on rape allegations.