Updated

An appeals court in Thailand on Tuesday overturned the guilty verdict of a man convicted of shooting four people, one fatally, by opening fire with an assault rifle concealed in a sack during a political confrontation in February 2014.

The shooter, afterward dubbed the "Popcorn Gunman" after the logo emblazoned on the sack, was part of a protest mob that sought to disrupt preparations for a snap election, and the shooting was directed at counter-demonstrators.

The court ruled Tuesday that there was not enough evidence to convict Vivat Yodprasit in the shootings, which were carried out by a man wearing a balaclava to conceal his identity. Last March, he received a 37-year, 4-month sentence for murder, attempted murder and illegal possession of weapons, halved from the original term because of his confession to police. However, he recanted his confession in court, claiming he had been tortured.

The shooter was part of a mob that sought to disrupt preparations for the election, and one or more opened fire on counter-demonstrators. The "Popcorn Gunman," who carried out his shooting in front of hundreds of people and was captured in many photos and videos, wounded four people, among them a 72-year-old man who was left paralyzed. He died seven months after the incident.

The shooter was believed to have fired his weapons from inside the sack in order to catch the expended bullet casings so they could not be gathered as evidence.

The prosecution based its case on Vivat's confession to police and also on video and photos showing a man identified as Vivat at the same protest with the same build and clothing as the shooter — but without the balaclava disguising his face.

"The evidence presented by prosecutors was not enough to confirm that the defendant was responsible for the crime," said his lawyer, Puangtip Boonsanong.

The confrontation was one of several bloody incidents in months of unrest stirred up by opponents of then-Prime Minister Yingluck Shinawatra's government, who called themselves the People's Democratic Reform Committee. They succeeded in disrupting the election, and the confrontations they staged served as a reason for the army to take power in a coup that May. Thailand remains under military rule.

Thailand has been buffeted by political turmoil since 2006, when protests against Thaksin Shinawatra, Yingluck's brother and prime minister since 2001, led to an earlier coup. Since then, Thaksin's supporters and opponents have been engaged in a sometimes violent power struggle.

Thailand's traditional power holders, including the military and the courts, have been among Thaksin's foes, and Tuesday's court ruling is likely to revive criticism that the judiciary rules with a political bias against Thaksin's supporters.

Despite the reversal of the guilty verdict, the court ordered that Vivat remain in custody pending a possible appeal by the prosecution.

His lawyer said Vivat would attempt to raise 3.7 million baht ($109,000) in bail for his release.