Amos Yee, a teenage blogger who shot to fame after posting a video celebrating the death of Singapore's founding ruler, has been granted asylum in the U.S., after spending nine months in immigration detention. The 18-year-old fled Singapore, which has strict laws governing speech and public expression, because he feared persecution.

Yee came to the U.S. after spending two weeks-long stints in prison in Singapore. In the end, though, he was detained by the U.S. government for months longer than he had been imprisoned in his home country.

A U.S. immigration judge had initially granted Yee's request for asylum back in March. But the Department of Homeland Security appealed that ruling, and Yee was then held in detention centers run by Immigration and Customs Enforcement.

The U.S. Board of Immigration Appeals recently dismissed the federal agency's appeal, agreeing with immigration Judge Samuel Cole that Singapore's criminal charges against Yee were a "pretext" to silence him. It also said Singapore's treatment of Yee had risen to the level of persecution — a finding DHS had contested. Yee was 16 when he was first arrested; the appeals board noted that his treatment included "being imprisoned with only adults and being placed in a mental institution with difficult conditions."

The blogger's case has been watched closely as a test of how President Trump's administration approaches human rights, as it involves questions of free expression and political freedoms. Rights groups such as PEN America and Human Rights Watch had called for Yee's release.

Yee's pro bono attorney, Sandra Grossman, criticized what she calls the "prolonged detention" of her client, "especially after his asylum case was granted and after DHS made no arguments, nor presented evidence, that Yee is a threat to national security or to the public."

Grossman added, "The United States should comply with its obligations to protect those who are unable to return to their home countries."

Yee fled Singapore last December; he was arrested in the U.S. after arriving in Chicago and requesting asylum. Since then, he has spent more than nine months in ICE detention centers.

Millions of people have watched Yee's YouTube videos, particularly one from March of 2015 in which he proclaimed, "Lee Kuan Yew is dead — finally!" — referring to Singapore's founder who is venerated by many within the island nation for his role in shaping the country. In a speech that was peppered with profanity, Yee, who was then 16 years old, continued, "Lee Kuan Yew was a horrible person."

Yee has repeatedly called Singapore a totalitarian state whose modern makeup was shaped by a dictator — Lee Kuan Yew, whose son, Lee Hsien Loong, is currently the country's prime minister.

Yee's stance earned him a profile story in The New Yorker. As Bob Dietz of the Committee to Protect Journalists told NPR at the time, "People know the rules and know the restrictions in Singapore. Amos did know the rules and really just wanted to go at them full force."

Singapore's authorities detained Yee for 55 days over that video, in which he also used profanity and made disparaging comments about religion. Yee, who is an atheist, also went to jail for several weeks in 2016, after the government said he was guilty of "deliberate intent to wound religious feelings" because of his comments about Christianity and Islam.

"The [Board of Immigration Appeals'] decision means that, subject to Amos passing any pending or new security and background checks, he will have been granted asylum in the United States," Grossman tells NPR. "This means he cannot be deported to Singapore and will have the protections of the U.S. Government. Within one year, he will be eligible to obtain residency, and then four years later, citizenship."

Copyright 2017 NPR. To see more, visit