Updated

A Thai court has sentenced a man to 27 years in prison for bombing a military hospital in what he said was an act of resistance to the country's ruling junta.

The Criminal Court on Wednesday found Wattana Pumret guilty of attempted premeditated murder, detonating a bomb and other charges linked to the blast that wounded 21 people at the Bangkok hospital. The attack took place on May 22, the third anniversary of a military coup that ousted the country's elected government.

Wattana pleaded guilty to the charges.

Wattana said at a police news conference in June that he bombed the hospital to defy military rule but didn't intend to harm anyone.

The ruling junta is facing increased pressure to lift a ban on political activities and hold elections.