Julian Assange claimed political asylum at the Ecuadorian embassy in London in June 2012 and has been there ever since. Here’s a breakdown of all the legal wranglings and diplomatic tension.
An arrest warrant is issued over separate allegations of rape and molestation after Mr Assange’s visit to Sweden. He is questioned in Stockholm and denies the claims.
Interpol put out an international arrest warrant after a Swedish court approves request to detain him on suspicion of rape, sexual molestation and unlawful coercion.
Mr Assange is remanded in custody after an extradition hearing in London. He later gets bail but is kept behind bars when Swedish authorities challenge the decision.
Conditional bail reinstated at High Court when supporters offer up £240,000.
The extradition request from Sweden is granted, as a UK judge says it would not breach Mr Assange’s human rights. The WikiLeaks founder vows to fight the ruling.
Mr Assange loses a High Court appeal against his extradition, and the case is destined for the highest court in the land.
Supreme Court upholds the decision and says the extradition is lawful. It later dismisses an attempt to reopen the appeal as being “without merit”.
Mr Assange steps inside the Ecuadorian embassy in London’s wealthy Knightsbridge.
He requests political asylum, fearing he could be eventually end up being extradited to the US to potentially face decades behind bars.
WikiLeaks’ publishing of masses of confidential information on the Afghanistan and Iraq wars, as well as American diplomatic memos, has made Mr Assange notorious and provoked fury among US intelligence and defence chiefs.
Ecuador grants the asylum request.
It means Mr Assange can be assured police are not able to enter and arrest him – as long as he doesn’t leave the building – because of special diplomatic immunity rules.
Metropolitan Police guard the building in case he tries to flee to the safe haven of the South American country.
Mr Assange appears on the embassy balcony as he urges an end to the US government “witch-hunt” of Wikileaks.
Five months in, Ecuador’s ambassador to the UK says their guest has a chronic lung condition after being cooped up inside the building.
Back in front of the media on the balcony, Mr Assange marks six months to say the “door is open” for talks with the Swedish authorities to end the deadlock.
A year has passed and the apparent stalemate shows no signs of being resolved.
Mr Assange tells reporters that he fears moves to extradite him to the US are already under way and that he won’t leave the embassy, even if the arrest warrant over the sex offence claims is withdrawn.
A defeat for Mr Assange as the Australian loses his legal bid for Swedish authorities to cancel the arrest warrant.
There is speculation Mr Assange needs hospital treatment for heart and lung problems.
He tells a news conference he will soon be leaving the embassy but dismisses claims that he is about to give up his fight over extradition to Sweden.
His legal team complains to the United Nations about the actions of the UK and Sweden. They say his confinement without charge amounts to illegal detention.
Mr Assange loses an appeal in Sweden over the decision to uphold the arrest warrant.
American linguist and philosopher Noam Chomsky and Hollywood actor John Cusack visit Mr Assange.
Other famous visitors to make a house call during his time in the embassy include ex-Baywatch star Pamela Anderson – who has dropped by on a number of occasions with a spot of lunch, Lady Gaga, Eric Cantona and civil rights campaigner Jesse Jackson.
Nigel Farage has also been spotted leaving the embassy but refused to say whether he had met Mr Assange.
Benedict Cumberbatch, however, was shunned by the WikiLeaks boss. The actor played him in the movie The Fifth Estate and wanted to meet him to study his mannerisms.
Mr Assange dismissed the book on which the film was based as “toxic”.
After years of getting nowhere, Swedish prosecutors ask to question Mr Assange inside the embassy.
Mr Assange claims the appointment to interview him has been cancelled.
The inquiry into the sexual molestation and unlawful coercion allegations is dropped after a legal time limit passes – but the more serious rape allegation stands and the investigation remains active.
The Foreign Office accuses Ecuador of preventing the proper course of justice by giving Mr Assange a safe haven.
Police call off their 24-hour watch outside the embassy after three years and an estimated cost of £12m. CCTV is later installed instead.
The UN Working Group on Arbitrary Detention agrees supports his legal team’s appeal and says Mr Assange is being “arbitrarily detained” at the embassy.
It urges an end to his “deprivation of liberty”.
Philip Hammond, then the foreign secretary, calls it “frankly ridiculous” – a response Mr Assange calls “insulting”.
Prosecutors say they are working on a new request to get inside the embassy and interview Mr Assange about the rape accusation.
Lawyers go back to court to try to get the arrest warrant dropped but a month later the request is turned down.
The Government formally asks the UN to review its “deeply flawed” conclusion that Mr Assange is being “arbitrarily detained”.
A cat – a gift from Mr Assange’s children – takes up residence at the diplomatic outpost. The dapper feline puts in periodic appearances in the embassy window sporting a red and white striped tie.
Ecuador confirms Sweden has put in a formal request to enter the embassy and interview Mr Assange.
Sweden’s court of appeal receives an appeal that argues it must comply with the UN assertion that Mr Assange’s is being illegally deprived of his liberty.
Mr Assange will be questioned inside the embassy, Ecuador confirms.
Sweden rejects the bid to get an arrest warrant dropped, saying nothing has changed.
Finally, Swedish authorities get their chance to put questions to the WikiLeaks founder during a two-day interview at the embassy.
Prosecutor Ingrid Isgren and police inspector Cecilia Redell were present – but it was an Ecuadorian prosecutor asking the questions.
Outgoing US president Barack Obama decides to free WikiLeaks’ key whistleblower Chelsea Manning, formerly Bradley Manning.
Speculation mounts that Mr Assange will finally draw a line under his time hunkered down in the Ecuadorian embassy after WikiLeaks tweets before the decision: “If Obama grants Manning clemency Assange will agree to US extradition despite clear unconstitutionality of DoJ (Department of Justice) case.”
Mr Assange pledges to stand by the offer to go to the US if his rights are respected.
Jeff Sessions, the new US attorney general, says Mr Assange’s arrest is a “priority”.
After years of legal fighting, Sweden’s prosecutor says the rape case has been dropped: “At this point, all possibilities to conduct the investigation are exhausted,” says Marianne Nye.
“He has tried to dodge all attempts to avoid Swedish and British legal authorities,” she adds.
Mr Assange tweets that his “name was slandered” and that he will not “forgive or forget”.
His accuser, meanwhile, says she is “shocked” and calls it a “scandal”.
Later, Mr Assange, speaking on the balcony of the Ecuadorian embassy, says Sweden’s decision to drop the rape claim investigation .
But he says he cannot forgive or forget the “terrible injustice” he has suffered.