Wikileaks founder Julian Assange wants to plead guilty as part of a deal with the US Department of Justice. After pleading guilty and being convicted of espionage, he must return to his homeland Australia back, according to a letter from the Ministry of Justice submitted to the court on Monday evening (local time).

This marks a resolution to the years-long legal wrangling surrounding Assange’s extradition from Britain to the US. However, a court must still approve the agreement.