A Vietnamese court on Friday overturned a six-year jail term handed to a student activist, freeing her on the spot in a rare show of leniency by the authoritarian nation.

The verdict which freed 21-year-old Nguyen Phuong Uyen on appeal was so unexpected – Vietnam’s courts routinely reject pleas by anti-state dissidents against their lengthy sentences – that her mother fainted, reports said.

Uyen was sentenced in May to six years in prison for distributing anti-state propaganda, prompting an outcry from Vietnamese social media users and international rights groups.

“She was freed at the court,” said lawyer Nguyen Thanh Luong – who does not represent Uyen but attended the proceedings.

Uyen was instead handed a three-year suspended sentence, he said.

Uyen’s co-defendant, 25-year-old computer technician Dinh Nguyen Kha, who was jailed for eight years at their trial in the southern province of Long An, had his sentence halved by the appeal court on Friday.