Image copyright AFP Image caption Amos (right) posted his video in late March and was arrested soon after

A Singapore court has found a teenager guilty of wounding religious feelings and obscenity after a two-day trial.

Amos Yee, 16, published a video critical of the late PM Lee Kuan Yew days after his death comparing him to Jesus Christ and disparaging both.

He also posted an obscene cartoon of Lee and former UK PM Margaret Thatcher. He pleaded not guilty to all charges.

The video sparked a backlash among Singaporeans as well as a debate about free speech.

The state dropped a third charge of harassment in relation to his anti-Lee comments.

Yee faces up to three years in prison, although prosecutors have asked for probation because of his age. The judge has called for an assessment for probation, which could mean he avoids jail time. Sentencing has been pushed to a later date.

"I don't know if I should celebrate my release or mourn my sentence," Yee said to reporters after he was bailed by his parents.

At the scene: Tessa Wong, BBC News, Singapore

With iron shackles on his hands and feet, Amos calmly shuffled into court, smiling at his parents and supporters.

The public gallery was packed with mostly middle-aged strangers and retirees - a few waved enthusiastically - with dozens more waiting outside.

Neither he nor his parents showed any emotion on their faces when the guilty verdict was announced.

Amos has fascinated and infuriated Singaporeans ever since he was arrested for his video, and to many he is seen as the boy who dared to insult Lee Kuan Yew.

What the trial of a teenage Lee Kuan Yew critic says about Singapore

Image copyright AFP Image caption Dozens of Singaporeans held a vigil on the eve of the verdict in a park in central Singapore.

Yee's video, titled Lee Kuan Yew is Finally Dead!, was posted on 23 March. He subsequently posted an obscene cartoon of Lee and Thatcher on his blog in an apparent reference to their close political relationship.

Authorities arrested him after at least 30 people filed police reports.

On Monday, a 49-year-old man who slapped Yee as he attended a court hearing was sentenced to three weeks in jail.

Now that he has been found guilty, the offending posts must be removed.

Human Rights Watch said on Tuesday that his convictions "run contrary to international human rights standards and are a dangerous affront to freedom of expression".

"The reality is convicting Amos Yee was all about publicly punishing a youthful dissident who dared besmirch the image of the recently passed leader, and intimidating anyone else who might think of doing the same in the future," said Phil Robertson, deputy director for Asia, in a statement.

The former prime minister is deeply respected in Singapore, despite a controversial legacy and accusations of autocratic rule.

While Yee's postings drew heavy criticism, there has also been support from those who see him as a free speech advocate.

Dozens of supporters held a candlelight vigil on Monday night.