LONDON — For the first time in almost seven years, WikiLeaks founder Julian Assange woke up outside the Ecuadorian Embassy in London on Friday morning. He had spent 2,487 consecutive days living in two small rooms to avoid being arrested after skipping bail.

He’s now in Belmarsh, a maximum security prison in southeast London after Ecuador withdrew political asylum and British police arrested him on Thursday.

He faces an extradition request from the U.S., where he is charged with conspiring to hack into secret files — a crime that carries a maximum five-year sentence.

So what's next for the renegade transparency activist?

Assange will soon be sentenced for failing to surrender to British police in 2012, when he was fighting an extradition order to Sweden on charges of sexual assault and rape.

At a hearing Thursday, District Judge Michael Snow accused Assange of being a “narcissist” and found him guilty of having broken his bail agreement. Assange faces up to a year in jail on the charge. Snow also called Assange's assertion that the hearing wasn't fair “laughable” — comments that may become the subject of a formal complaint.

In 2012, Assange was due to appear at a police station according to the terms of his bail, but instead went to the Ecuadorian Embassy in London dressed as a motorcycle messenger, knowing that police wouldn’t enter and arrest him due to diplomatic custom.

The more serious charge facing him now, however, is that he conspired with Chelsea Manning, the former Army intelligence analyst, to hack into U.S. military intelligence files — the subject of Washington's extradition request.

In April 2010, WikiLeaks released a video provided to them by Manning showing a 2007 U.S. airstrike that killed more than 10 Iraqis and two journalists. Manning was later arrested and sentenced to 35 years in prison for leaking the trove of military intelligence records. Her sentence was commuted by President Barack Obama in 2017 after seven years.

Assange will appear via video link in court on May 2 to hear the extradition order and again on June 12. Don't expect an outcome soon: This process could take up to two years and possibly longer. Depending on the outcome of Brexit, Assange could potentially take his case from the U.K. courts all the way to the European Court of Justice in Strasbourg, the ultimate legal arbiter for E.U. states.

Assange describes himself as a journalist and it is likely that his legal team will focus on his role as publisher of material in the public interest, which was presented in partnership with mainstream news organizations including The Guardian and The New York Times.

It is not certain that this approach will work.

“My understanding of the European Court case law is that there are cases where there have been prosecutions against journalists — usually they’re for things like defamation of public figures or publishing things that they shouldn’t have,” said Adam Wagner, a leading human rights lawyer who is not connected to the Assange case.

“I don’t think there’s been any case involving a developed democracy with sophisticated national security laws … where a journalist, or whatever you want to call Assange, has avoided a prosecution for hacking into or breaking into national security files,” he added. “It just seems really unlikely.”

Assange’s team could also argue that what the indictment accuses him of trying to do — creating a new password to access the secret files under a different username — was an attempt to give Manning greater anonymity.

“I suppose Assange’s best free expression argument, which I expect they will be making, is it’s all about protection of sources,” Wagner said. “It is possible to argue that was what he was doing, not conspiring to get the files — it was about ensuring that Manning wasn’t identified and wasn’t caught.”

Wagner also pointed out that while some journalists have been highly skeptical of Assange’s journalistic defense, many big stories in the past have been legally questionable.

“Some journalists are saying, 'We all know the difference between illegality and nonillegality.' But some of the great scoops of the past, such as the Pentagon Papers, were very much in a gray area of legality.”

British legal commentator Joshua Rozenberg said it was unlikely Assange’s public interest defense would be well received by the U.K. courts.

“He does have rights of freedom of expression, sure, but it doesn’t mean that you are able to change passwords and all that stuff just because you think that the ultimate aim justifies the means. He may try this, but I don’t think he will get very far,” he said.

“The scope for argument is over whether what he’s accused of doing in the U.S. is the equivalent of a crime in the U.K. I’m not sure what the equivalent crime would be, but I’m sure there must be one. But will he try to fight it all the way? I’m sure he will.”

Ecuador said Thursday that it had extracted a promise from the U.K. that Assange wouldn’t be sent anywhere he could face the death penalty or torture. This could be an element that crops up in the hearings ahead.

It also remains possible that Assange could face extradition to Sweden. Prosecutors there confirmed that while the sexual assault charge against him had lapsed, the rape charge remains active until August 2020, should Assange set foot in Sweden.

However, it’s likely the U.K. will consider the extradition requests in the order they were received, and the U.S. got there first.

In the meantime, Assange has to get used to life in a different kind of captivity.