Democracy activists Raphael Wong, left, and Joshua Wong speak outside the High Court in Hong Kong on Wednesday. The court sentenced Joshua Wong to three months in prison and Raphael Wong to four months and 15 days on contempt charges. (Jerome Favre/EPA/Shutterstock)

 Hong Kong activist Joshua Wong was sentenced to three months in jail on Wednesday for obstructing a court order to clear a protest site during the 2014 pro-democracy Umbrella Movement.

It is the second time that Wong, 21, has been jailed for his role in leading the protests, during which tens of thousands of people, mostly students and youths, occupied key highways and streets in Hong Kong to call for democracy.

“Keep it up, everyone!” Wong called out in court before officers took him into custody, the Associated Press reported.

He had pleaded guilty last year to failing to comply with the court order, but he had said ahead of the hearing that he had no regrets and vowed to keep fighting for democracy. “They can lock up our body, but they can’t lock up our mind,” he told reporters.

Fellow activist Raphael Wong received a sentence of four months and 15 days, news agencies reported. Fourteen others were given suspended sentences.

Pro-democracy protesters in Hong Kong, Oct. 28, 2014. (Alex Hofford/EPA)

High Court Judge Andrew Chan said in the ruling that although Joshua Wong stayed in the protest camp only briefly, his involvement in obstruction was deep and extensive, according to the Associated Press. 

“He played a leading role on that day. In view of his overall involvement, I am of the view that the only appropriate punishment for Mr. Wong will be one of immediate imprisonment,” Chan ruled.

The protesters who had occupied the heart of Hong Kong for 79 days in 2014 had demanded greater democracy and the chance to freely elect the semiautonomous territory’s chief executive. The governments of Hong Kong and Beijing rejected those demands.

Wong helped lead those protests while still a teenager and became the most well-known face of Hong Kong’s democracy movement. The mobilization became associated with the yellow umbrellas that protesters used to shield themselves from police pepper spray and batons.

Under the terms of a deal negotiated during the 1997 handover from British rule, Hong Kong is supposed to enjoy a high degree of autonomy under Chinese rule. Critics say China has not respected the terms of that agreement and increasingly interferes in Hong Kong’s affairs to reduce the space for free speech and peaceful protest.

The pro-democracy movement has suffered setbacks in the face of government intransigence in the aftermath of the protests: Some activists have split away to form a movement calling for outright independence from China.

Four activists won election to the territory’s legislature last year but were disqualified for failing to take the oath of office correctly. Elections to replace them are set for March.

Others have had to fight multiple court cases.

“We will vote in prison in the March by-election,” Wong tweeted Wednesday. “We will accept it with calmness. We hope the pro-democracy camp will unite.”

He has already served roughly two months of a six-month sentence in a separate case relating to the protests.  

He and two other activists were jailed last year for taking part in or inciting unlawful assembly by storming a courtyard at government headquarters at the start of the protests. 

They were later released on bail pending an appeal, which was heard Tuesday. 

The three had initially been let off with suspended sentences or community service on those charges — until Hong Kong’s justice secretary stepped in and ordered a review of the case. That intervention sparked fears that Beijing had demanded a stiffer sentence. 

The ruling in that appeal has yet to be announced.