Ecuador has granted citizenship to fugitive WikiLeaks founder Julian Assange, the South American nation announced Thursday, in a bid to end his more than five-year stay at its embassy in London and resolve a protracted dispute with Britain.

But a standoff continued with the British government, which rejected an Ecuadoran request that it grant diplomatic status to Assange, insisting instead that the Australian national must "leave the embassy to face justice."

Ecuador's foreign minister, María Fernanda Espinosa, subsequently said that Assange would not leave the embassy in the absence of security guarantees. She said in a news conference Thursday in Quito, the Ecuadoran capital, that Assange was granted citizenship Dec. 12, after having applied for it in September.

Espinosa also said that Ecuador was concerned about potential threats to Assange's life from unspecified other nations and was looking for a "dignified" way to resolve an "unsustainable" situation at its London embassy, where Assange has been living in a small office, and end the stalemate with Britain.

Wikileaks founder Julian Assange speaks at Ecuador’s embassy in London on May 19, 2017. (Reuters)

The British government said in a statement Thursday that the granting of Ecuadoran nationality "does not in any way change Julian Assange's legal status" in Britain.

"Julian Assange is in breach of bail conditions set in 2012 and chose to enter the Ecuadorean Embassy of his own volition," the statement added. "The government of Ecuador knows that the way to resolve the situation is for Julian Assange to leave the embassy to face justice. Nobody should pretend that granting him Ecuadorean citizenship is a route to solving this longstanding issue."

Assange, who angered the U.S. government when his anti-secrecy organization published troves of classified documents obtained in 2010 from a U.S. Army intelligence analyst in Iraq, sought refuge in the Ecuadoran Embassy in August 2012 to avoid extradition to Sweden, where he was sought for alleged sexual offenses. Sweden later dropped the case, but Assange remained ensconced in the embassy because he still faced arrest in Britain for jumping bail.

He also has expressed fear of extradition to the United States, where the Justice Department is weighing whether to charge him for his role in publishing the secret documents leaked by Army soldier Bradley Manning, now known as Chelsea Manning.

News of the move to grant Assange citizenship emerged Wednesday when the Ecuadoran newspaper El Universo reported that, according to the country's civil register, he had been assigned an identity number. The daily reported that Assange also may have been issued a passport.

The Ecuadoran Foreign Ministry at first responded that it would not address "rumors or distorted or out-of-context information," Germany's DPA news agency reported.

Assange surrendered to British police in December 2010, a month after Sweden requested his extradition, and was held for 10 days before he was released on bail. But when his effort to block extradition was rejected, he jumped bail and became a fugitive, seeking asylum at the Ecuadoran Embassy.

His asylum request was granted by Ecuador's then-president, Rafael Correa, a fiery leftist and fierce critic of Washington who once expelled the U.S. ambassador and the U.S. Agency for International Development from his country.

However, Correa was succeeded last year by his former vice president, Lenín Moreno, who has sought to put Ecuador on a more moderate path. The new president also engaged in a public spat with Assange over the WikiLeaks founder's vocal support for Catalan separatists in Spain.

The Washington Post reported in April 2017 that federal prosecutors were weighing whether to bring criminal charges against members of WikiLeaks, revisiting the 2010 publication of U.S. diplomatic cables and military documents, and investigating the organization's more recent revelation of sensitive CIA cyber-tools.

Under President Barack Obama, the Justice Department decided not to charge WikiLeaks for revealing some of the government's most sensitive secrets on grounds that doing so would be like prosecuting a news organization for publishing classified information. But President Trump's Justice Department under Attorney General Jeff Sessions has indicated that it may take a different view.

When Assange sought refuge in the red-brick Ecuadoran Embassy in the Knightsbridge area of London, next to Harrods department store in one of the city's poshest areas, he said his underlying concern was that returning to Sweden would lead to extradition to the United States.

Last year, Swedish prosecutors said they were dropping an investigation into sexual assault allegations because they were unable to serve him notice.

Internal memos from staff at the embassy, seen by BuzzFeed and the journalist Fernando Villavicencio, paint a picture of a sometimes stressful and difficult relationship between Assange and his hosts.

A more public dispute emerged in 2016 when Ecuador cut off Assange's Internet connection due to concerns that WikiLeaks was interfering in the U.S. presidential election after the organization published hacked emails from the Democratic National Committee.

A medical evaluation of Assange, written anonymously and tweeted by WikiLeaks in 2016, said his bedroom was "just big enough for a single bed and a small cupboard for clothes." It complained that "there is no room for a chair or desk" and that "the room receives no sunlight." It added that Assange has "shared use of a second room," containing a desk, chairs and a treadmill.

At her news conference Thursday in Quito, Espinosa lamented that Ecuador's latest attempts to resolve the stalemate in a way acceptable to Britain were leaked prematurely. Apart from trying to arrange diplomatic status for Assange, she said, "Another option has been granting the asylee a special status, recognized under the Geneva Convention of diplomatic relations, with the aim of increasing his chances of protection."

WikiLeaks first burst onto the world scene a decade ago with headline-grabbing revelations about alleged abuses at the U.S. military's Guantanamo Bay detention camp in Cuba and the Abu Ghraib prison in Iraq. The nonprofit, whose mission was to publish leaked documents revealing official malfeasance and overreach, and its flamboyant but reserved boss quickly became darlings of progressives and freedom-of-information campaigners.

But since then, Assange and his organization have fallen from favor, alienating many on the left by providing a conduit for purloined Democratic Party emails that helped undermine Hillary Clinton's 2016 presidential bid. U.S. intelligence agencies have concluded that the stolen material came from Russian hackers working for the Kremlin, although Assange has denied knowing their provenance.

The sexual assault allegations also tarnished Assange's reputation. Unable to interview the only suspect in the case, Swedish prosecutors shelved their investigation, although they could reopen it if they were able finally to gain access to him.

For Correa, providing refuge to Assange offered the then-president a chance to raise his international profile while cementing his leftist credentials during a stormy period at home. However, Moreno, with whom Correa has now had a spectacular falling-out, has proved a less enthusiastic ally of Assange.

The current Ecuadoran president has publicly told Assange to refrain from getting involved in Catalonia's independence struggle and politics more generally. In response, Assange angrily tweeted back that Moreno was trying to "gag my reporting of human rights abuses."

Ecuadoran analysts said Moreno has been looking for a face-saving strategy to get Assange out of the London embassy, where his continued presence brings the president little domestic political benefit while placing him at diplomatic loggerheads with the United States and other Western democracies.

Ramiro Crespo, a Quito-based investment analyst, said the Moreno administration has become increasingly "uncomfortable" hosting Assange in the embassy, adding that Ecuador no longer needs to deflect attention from its repression of journalists, an authoritarian Correa policy that Moreno has reversed.

"Assange's presence in the embassy has very high diplomatic and reputational costs for Ecuador," Crespo said. "Correa used Assange as a propaganda weapon to say that he was a defender of human rights, something that no one in Ecuador believes anymore."

Moreno "is more pragmatic" and "wants to have good relations with the U.S. and Europe," Crespo added, "and Assange really has no utility for him."

Adam reported from London. Tegel reported from Lima, Peru.