Hong Kong's Court of Final Appeal on Friday quashed jail sentences for 13 pro-democracy activists who stormed the city's legislative council in a dramatic 2014 protest.
The group were earlier sentenced to between eight and 13 months after the government successfully sought to overturn a previous punishment of community service and seek harsher terms.
All 13 were already on bail pending their appeal.
They included democracy activists, student leaders and villagers from Hong Kong's rural northeast who had been convicted of unlawful assembly for forcing their way into the territory's legislature.
The group was part of a larger protest against a government plan to redevelop the area for housing, which they said was being waved through without proper consultation.
Their actions came weeks before the pro-democracy Umbrella Movement mass rallies which brought parts of Hong Kong to a standstill for more than two months.
Activists said they were "happy and excited" about the result and denied using violence in the protest.
"We had no intention at all to hurt anybody," said Raphael Wong, one of the 13 protesters.
Pro-democracy protests in Hong Kong faced more restrictions and demonstrators would have to be "well-disciplined" in future, he added.
It was the second time this year that the city's highest court freed democracy activists who had been jailed after their lighter original sentences were increased on appeal from the government.
In February, three leaders of the Umbrella Movement including student activist Joshua Wong won an appeal against their jail terms in a case seen as a test of the independence of the city's judiciary.
They had also originally been given community service or suspended sentences which had been switched to jail terms.
Hong Kong has been governed under a "one country, two systems" arrangement since 1997, when Britain handed the territory back to China.
The deal allows citizens rights unseen on the mainland, including freedom of speech and an independent judiciary.
But there are growing concerns that the semi-autonomous city's rights are under threat as Beijing tightens its grip.