To his supporters, Julian Assange is a freedom fighter and tireless campaigner for the truth. To his critics, he's dangerous, with now-US President Joe Biden likening him to a "high-tech terrorist" back in 2010.
The Australian's rise to global prominence and subsequent legal battles have divided the public over the past two decades.
Today, the drawn-out saga entered a new chapter.
The WikiLeaks founder has made a plea deal with the US Department of Justice that looks set to see him return home to Australia very soon.
WikiLeaks confirmed Assange left the United Kingdom after spending more than five years in Belmarsh prison and seven years in the Ecuadorian embassy.
According to court documents, Assange will enter a guilty plea in a hearing in the US territory of Northern Mariana Islands on Wednesday, bringing to close a long-running legal battle over charges of espionage and computer misuse.
The charges relate to WikiLeaks' publication of almost half a million classified US military and diplomatic cables in 2010.
Assange claims the documents exposed war crimes, including the alleged killing of civilians by US soldiers in Afghanistan and Syria.
It was this high-profile document dump that made him a household name and an enemy of the White House.
Then-US president Barack Obama condemned it as a "deplorable act" that put lives at risk.
But Assange's high-profile run-in with the US government wasn't his first.
In fact, his hacking prowess had already raised red flags among American authorities when he was a teenager on the other side of the world.
Born in Townsville, Queensland in 1971, he attended 37 different schools and was periodically home-schooled as he travelled around Australia with his mother.
As a teenager, he infiltrated some of the world's most secure systems, including NASA and the Pentagon using the hacker name "Mendax".
In the 2010 documentary "WikiRebels", Assange claimed to have had "a backdoor into the US military Security Coordination Center" for two years.
Following a tip-off from the US in 1994, Australian police charged the then-21-year-old with 31 counts of cybercrime.
He pleaded guilty to 25 charges and received a small fine as punishment after the judge ruled he was motivated by "intellectual inquisitiveness", not malice.
For the next decade, he studied, travelled and worked as a computer security consultant, until the launch of WikiLeaks in 2006.
Assange founded the media organisation with a mission to expose unethical behaviour by governments and businesses, claiming he was on a quest for "radical transparency and truth".
WikiLeaks has published more than 10 million documents since its inception, including details about the Guantanamo Bay military detention facility and classified information from within the Scientology movement.
But the most significant to date is the secret trove of US military cables published in 2010.
In particular, a video titled Collateral Murder that was filmed from a US military Apache helicopter as it shot dead two Reuters journalists and nine other men.
"I believe that if those killings were lawful under the rules of engagement then the rules of engagement are wrong. Deeply wrong," Assange said of the video.
The files were given to Assange by former US soldier Chelsea Manning, who was later sentenced to 35 years in a US military prison for her role in the document leak.
Manning spent seven years behind bars before her sentence was commuted by president Obama in 2017.
One move with a cascade of legal battles
WikiLeaks' publication of the US military files captured international attention, but it also marked the start of a string of legal battles for its Australian founder.
In August 2010, Swedish prosecutors issued an arrest warrant for Assange on two separate allegations of rape and molestation.
Assange said the allegations were "without basis" and left Sweden for the UK before he could be questioned over the incidents.
He was arrested in London and released on bail, as he fought a Swedish extradition request.
With the sexual assault allegations hanging over him, Assange was awarded the gold medal of honour by the Sydney Peace Foundation — an award previously given to Nelson Mandela and the Dalai Lama — for his "exceptional courage in pursuit of human rights".
In 2012, the UK's Supreme Court approved his extradition to Sweden, prompting Assange to break his bail conditions and enter the Ecuadorian embassy in London, where he was granted asylum.
At the time, the Ecuadorian government said it was concerned Assange could be extradited to the US to face "political prosecution" if he was sent back to Sweden.
"The evidence shows that if Mr Assange is extradited to the United States, he wouldn't have a fair trial," then-minister of foreign affairs Ricardo Patino said.
"It is not at all improbable he could be subjected to cruel and degrading treatment and sentenced to life imprisonment or even capital punishment."
While inside the embassy, Assange ran for a seat in the Australian Senate, was frequently visited by actress Pamela Anderson and had two children with his lawyer and now wife, Stella Assange.
He also used his media platform to influence the 2016 US presidential election, with WikiLeaks publishing emails stolen by Russian operatives that damaged Democratic candidate Hillary Clinton's campaign.
Her rival and the ultimate victor Donald Trump declared "I love Wikileaks" throughout his own campaign, though later he claimed to have "no opinion" on Assange and is now considering pardoning him.
After five years of Assange being under de facto house arrest in the embassy, Swedish prosecutors dropped their investigation into the rape and molestation allegations in May 2017.
Assange remained under Ecuador's protection until he wore out his welcome two years later over claims he smeared faeces on the embassy's walls and violated international law.
"He exhausted our patience and pushed our tolerance to the limit," Ecuador's then-president Lenin Moreno told BBC.
"He even attacked some of the guards, something that definitely can't be tolerated."
Assange was arrested by British Police and dragged out of the embassy in April 2019, and was sentenced to 50 weeks in prison for breaching his bail conditions seven years earlier.
That prison stay extended to five years after the US made a new extradition request over the 2010 military documents leak.
Assange and his legal team fought a protracted legal battle against his extradition in the UK courts.
With Assange aged 52 and in declining health, his lawyers and family feared he wouldn't have the mental or physical strength to survive the US prison system.
His wife, Stella Assange, warned the WikiLeaks founder would die in the US.
"His health is in decline, mentally and physically. His life is at risk every single day he stays in prison," Ms Assange said.
"The situation is extremely grave."
The Australian government lobbied for the US to drop the charges against Assange and allow him to return to his home country.
Now, after 62 months in London's high-security Belmarsh prison, Assange has left the UK to embark on a new chapter as a "free man".
An anticipated plea deal with US prosecutors will allow him to walk free for the first time, after years of incarceration and confinement.