The legal odyssey of Julian Assange took a bizarre twist Tuesday when the WikiLeaks founder waltzed into the Embassy of Ecuador in London and requested political asylum in a bid to avoid facing allegations of sexual misconduct in Sweden.

While keeping with Assange’s often-unpredictable methods, the surprise move by the man who masterminded the release of tens of thousands of secret U.S. cables and other sensitive documents appeared to catch British authorities off-guard. It raised the possibility of yet another dramatic chapter in Assange’s 16-month-long effort to fend off extradition, with the potential to escalate into an embarrassing diplomatic incident putting the leftist government of Ecuadoran President Rafael Correa in the position of weighing Assange’s claim that he is being politically persecuted by Britain, Sweden and the United States.

The asylum request, Ecuadoran officials said, was under review, with Foreign Minister Ricardo Patino posting a message on his Twitter account saying that Assange had written to Correa to say he was being persecuted for “publishing truth that compromises the powerful.” The foreign minister signaled that his country was “ready to defend principles, not narrow interests.”

Assange was especially worried about being extradited to the United States and said he had been receiving death threats, Patino added in his tweets.

Yet Assange was seeking asylum in Ecuador despite criticism by organizations, including Human Rights Watch, that journalists in the South American nation have been jailed under laws that punish “a lack of respect” toward government officials and particularly the president.

The Ecuadoran Embassy said Assange would for now remain under its diplomatic protection while officials considered his request.

“As a signatory to the United Nations Universal Declaration for Human Rights, with an obligation to review all applications for asylum, we have immediately passed his application on to the relevant department in Quito,” the embassy said in a statement.

The British Foreign Office declined to comment on the legalities of what might happen if Assange wins asylum until it gathered more information. It said that Assange was, by nature of being at the Ecuadoran Embassy, currently “beyond the reach” of British law enforcement officials.

Assange’s supporters — including several celebrities who put up his $384,000 bail — appeared equally taken aback, with the socialite Jemima Khan telling the Guardian newspaper, “I had expected him to face the allegations. I am as surprised as anyone by this.”

Assange, a self-described nemesis of the U.S. government, has long cultivated a relationship with Ecuador, whose leader, Correa, maintains close ties with Venezuela’s president, Hugo Chavez, and other anti-Washington governments in Latin America. In December 2010, an Ecuadoran Foreign Ministry official suggested that Assange would be welcomed there with opened arms, although Correa later dismissed the offer as unofficial and in need of further consideration.

But since then, Assange has personally nurtured ties with Correa, interviewing the Ecuadoran leader on the 40-year-old Australian’s freshly launched TV show carried on the Kremlin-backed Russia Today channel. During the interview, the two exchanged warm laughs and noted the U.S. cables released by WikiLeaks had sparked the expulsion of the U.S. ambassador to Quito, Heather Hodges, for suggesting high-level knowledge of corruption.

Assange was beginning to exhaust his legal options in Britain to avoid extradition to Sweden, where he is wanted for questioning about separate encounters he had with two WikiLeaks volunteers in August 2010. Although he admits to brief affairs with the women, he denies their accusations of rape, sexual assault and unlawful coercion.

Since December 2010, Assange has faced a limited form of house arrest in Britain, staying mostly with friends and under a strict evening curfew. On June 14, Britain’s Supreme Court rejected an application from Assange to reopen his case and granted him two weeks before extradition proceedings would commence.

By seeking asylum now, however, Assange was flaunting the conditions of his house arrest, apparently risking being held behind bars as his case is decided should Ecuador ultimately reject his petition.