FILE - In this May 12, 2015, file photo, Singapore teen blogger Amos Yee speaks to a reporter while leaving the Subordinate Courts after being released on bail, in Singapore. Yee whose online posts blasting his government landed in him jail was granted asylum to remain in the United States, an immigration judge in Chicago ruled Friday, March 24, 2017. Yee has been detained by federal immigration authorities since December when he was taken into custody at Chicago's O'Hare International Airport. Attorneys said the 18-year-old could be released from a Wisconsin detention center as early as Monday. (AP Photo/Wong Maye-E, File)
FILE - In this May 12, 2015, file photo, Singapore teen blogger Amos Yee speaks to a reporter while leaving the Subordinate Courts after being released on bail, in Singapore. Yee whose online posts blasting his government landed in him jail was granted asylum to remain in the United States, an immigration judge in Chicago ruled Friday, March 24, 2017. Yee has been detained by federal immigration authorities since December when he was taken into custody at Chicago's O'Hare International Airport. Attorneys said the 18-year-old could be released from a Wisconsin detention center as early as Monday. (AP Photo/Wong Maye-E, File) Credit: Wong Maye-E

A Singapore blogger who was jailed for blasting his government online was granted asylum to remain in the U.S., Judge Samuel Cole ruled Friday.

Amos Yee, 18, has been detained by federal immigration authorities since December when he was taken into custody at Chicagoโ€™s Oโ€™Hare International Airport.

Yee left Singapore with the intention of seeking asylum in the U.S. after being jailed for several weeks in 2015 and 2016. An atheist, he was accused of hurting the religious feelings of Muslims and Christians in the city-state.

Cole said testimony during Yeeโ€™s hearing showed that while the Singapore governmentโ€™s stated reason for punishing him involved religion, โ€œits real purpose was to stifle Yeeโ€™s political speech.โ€

Yee’s attorney Sandra Grossman said her client was elated. “He’s very excited to begin new life in the United States,” she said.

In a phone interview from jail this month Yee told the Associated Press that he feared returning to Singapore, but that heโ€™d continue to speak out.

โ€œI have an infinite amount of ideas of what to do,โ€ he said.