Julian Assange in the Ecuadorian embassy: Timeline
Wikileaks co-founder Julian Assange has been holed up in the Ecuadorean embassy in London since 2012, after seeking asylum there to avoid extradition to Sweden on a rape allegation.
Mr Assange denies the claims and Sweden later dropped their investigations.
But he still faces the lesser charge of failing to surrender to a court in 2012 and says this could lead to an extradition to the US for publishing US secrets on the Wikileaks website.
These are the key dates:
- August 2010 - the Swedish Prosecutor's Office first issues an arrest warrant for Mr Assange. It says there are two separate allegations - one of rape and one of molestation. Mr Assange says the claims are "without basis"
- December 2010 - Mr Assange is arrested in London and bailed at the second attempt
- May 2012 - the UK's Supreme Court rules he should be extradited to Sweden to face questioning over the allegations
- June 2012 - Mr Assange enters the Ecuadorean embassy in London
- August 2012 - Ecuador grants asylum to Mr Assange, saying there are fears his human rights might be violated if he is extradited
- August 2015 - Swedish prosecutors drop their investigation into two allegations - one of sexual molestation and one of unlawful coercion because they have run out of time to question him. But he still faces the more serious accusation of rape.
- October 2015 - Metropolitan Police announces that officers will no longer be stationed outside the Ecuadorean embassy
- February 2016 - A UN panel rules that Mr Assange has been "arbitrarily detained" by UK and Swedish authorities since 2010
- May 2017 - Sweden's director of public prosecutions announces that the rape investigation into Mr Assange is being dropped
- July 2018 - The UK and Ecuador confirm they are holding ongoing talks over the fate of Mr Assange
Below is more information on how events have unfolded:
11 August 2010
Julian Assange arrives in Sweden on a speaking trip partly arranged by "Miss A", a member of the Christian Association of Social Democrats. He has not met "Miss A" before but reports suggest they have arranged in advance that he can stay in her apartment while she is out of town for a few days.
14 August 2010
"Miss A" and Mr Assange attend a seminar by the Social Democrats' Brotherhood Movement on "War and the role of media", at which the Wikileaks founder is the key speaker. The two reportedly have sex that night.
17 August 2010
Mr Assange reportedly has sex with a woman he met at the seminar on 14 August, identified as "Miss W".
Some time between 17 and 20 August, "Miss W" and "Miss A" are in contact and apparently share with a journalist the concerns they have about aspects of their respective sexual encounters with Mr Assange.
18 August 2010
Mr Assange applies for a residence permit to live and work in Sweden. He hopes to create a base for Wikileaks there, because of the country's laws protecting whistle-blowers.
20 August 2010
The Swedish Prosecutor's Office issues an arrest warrant for Mr Assange on allegations of rape and molestation.
Both women reportedly say that what started as consensual sex became non-consensual.
Wikileaks quotes Mr Assange as saying the accusations are "without basis" and that their appearance "at this moment is deeply disturbing". A later message on the Wikileaks Twitter feed says the group has been warned to expect "dirty tricks".
21 August 2010
The arrest warrant is withdrawn. "I don't think there is reason to suspect that he has committed rape," says one of Stockholm's chief prosecutors, Eva Finne.
Prosecutors say the investigation into the molestation allegation will continue but it is not a serious enough crime for an arrest warrant.
The lawyer for the two women, Claes Borgstrom, lodges an appeal to a special department in the public prosecutions office.
31 August 2010
Mr Assange is questioned by police in Stockholm and formally told of the allegations against him, according to his lawyer at the time, Leif Silbersky. The activist denies the allegations.
1 September 2010
Swedish Director of Prosecution Marianne Ny says she is reopening the rape investigation against Mr Assange. "Considering information available at present, my judgement is that the classification of the crime is rape."
18 October 2010
The Wikileaks founder (an Australian citizen) is denied residency in Sweden. No reason is given, although an official on Sweden's Migration Board tells the AFP news agency "he did not fulfil the requirements".
18 November 2010
Stockholm District Court approves a request to detain Mr Assange for questioning on suspicion of rape, sexual molestation and unlawful coercion. Ms Ny says he has not been available for questioning.
By this time Mr Assange has travelled to London. His British lawyer, Mark Stephens, says his client offered to be interviewed at the Swedish embassy in London or Scotland Yard or via video link. He accuses Ms Ny of "abusing her powers" in insisting that Mr Assange return to Sweden.
20 November 2010
Swedish police issue an international arrest warrant for Mr Assange via Interpol.
8 December 2010
The Wikileaks founder gives himself up to British police and is taken to an extradition hearing. He is remanded in custody pending another hearing.
16 December 2010
Mr Assange is granted bail by the High Court and is freed after his supporters pay £240,000 in cash and sureties.
24 February 2011
A British court rules that Mr Assange should be extradited to Sweden.
3 March 2011
Lawyers lodge papers at the High Court for an appeal against extradition.
2 November 2011
The High Court upholds the decision to extradite Mr Assange .
5 December 2011
Mr Assange wins the right to petition the UK Supreme Court directly after judges rule that his case raised "a question of general public importance".
30 May 2012
The Supreme Court rules that he should be extradited to Sweden.
19 June 2012
Ecuador's foreign minister says Mr Assange has applied for political asylum at Ecuador's embassy in London.
15 August 2012
Ecuador's foreign minister claims the UK has issued a "threat" to enter the Ecuadorean embassy in London to arrest Mr Assange. The Foreign Office says it reminded Ecuador that it has the power to revoke the diplomatic immunity of an embassy on UK soil and says Britain has a legal obligation to extradite him.
16 August 2012
Ecuador grants asylum to Mr Assange, saying there are fears his human rights might be violated if he is extradited. Mr Assange describes it as a "significant victory", but the UK government expresses its disappointment.
20 August 2012
The UK insists it will not grant Mr Assange "safe passage" to Ecuador as it seeks a diplomatic solution. Downing Street says the government is legally obliged to extradite him to Sweden.
8 October 2012
Nine people who put up bail sureties for Mr Assange are ordered by a judge to pay thousands of pounds each after his failure to appear in court.
29 November 2012
Ecuador's ambassador says Mr Assange has a chronic lung infection "which could get worse at any moment". The embassy says it sought assurances Mr Assange would not be arrested if he was taken to hospital.
18 August 2014
Mr Assange says he will leave London's Ecuadorean embassy "soon" after two years of refuge. He does not clarify when he will depart but says it is "probably not" for the reasons reported in the UK press. Stories had suggested he required medical treatment.
13 August 2015
Swedish prosecutors drop their investigation into one accusation of sexual molestation and one of unlawful coercion against Mr Assange because they have run out of time to question him. The more serious allegation of rape is not due to expire until 2020.
12 October 2015
Scotland Yard announces it will no longer be sending officers to stand guard outside the Ecuadorean embassy in London. Officers had been there since 2012, at an estimated cost of more than £12m.
The Metropolitan Police says the effort is "no longer believed proportionate" but it would be deploying "a number of overt and covert tactics to arrest" Mr Assange.
5 February 2016
A UN panel rules that Mr Assange should be allowed to walk free and be compensated for his "deprivation of liberty".
The UN's Working Group on Arbitrary Detention says the Wikileaks founder was arbitrarily detained by UK and Swedish authorities since his arrest in 2010, and the detention violated his human, civil and political rights.
Mr Assange hails it a "significant victory" and calls the decision "binding" - but UK Foreign Secretary Philip Hammond brands the ruling "ridiculous".
The UK Foreign Office says the report "changes nothing" and it will "formally contest the working group's opinion".
Before the ruling, police said he would still be arrested if he left the embassy.
14 November 2016
Sweden's chief prosecutor Ingrid Isgren travelled to London to question Mr Assange at the Ecuadorean embassy.
Ms Isgren listened as the questions were put to him by an Ecuadorean prosecutor, under an agreement worked out with Ecuador.
Outgoing US President Barack Obama commutes the prison sentence given to US army private Chelsea Manning for leaking classified documents to Wikileaks.
Mr Assange says he stands by his offer to agree to be extradited to the US if Mr Obama granted clemency to Manning.
21 April 2017
US Attorney General Jeff Sessions says arresting Mr Assange is a priority. No charges have been filed against him in the US but US media outlets report that federal prosecutors are considering charges.
17 May 2017
Chelsea Manning is released from Fort Leavenworth military prison in Kansas.
19 May 2017
Sweden's director of public prosecutions announces that the rape investigation into Mr Assange is being dropped.
11 January 2018
The Ecuadorian government confirms Mr Assange was granted Ecuadorian citizenship in December and asks the UK to recognise him as a diplomatic agent - a move that would give him immunity. The UK refuses.
26 January 2018
Lawyers for Mr Assange ask for a UK warrant for his arrest to be dropped.
13 February 2018
An arrest warrant for Mr Assange is upheld by Westminster Magistrate's Court.
24 February 2018
Ecuador says the country's latest efforts to negotiate the departure of Mr Assange from its London embassy have failed.
28 March 2018
Ecuador cuts Mr Assange's internet connection to prevent him from interfering in other countries' affairs.
18 May 2018
Ecuador removes extra security at its London embassy following claims that $5m (£3.7m) was spent to protect Mr Assange.
27 July 2018
The UK and Ecuador confirm they are holding ongoing talks over the fate of Mr Assange. Ecuador's President Lenin Moreno says he was never "in favour" of Mr Assange's activities.