Joshua Wong, one of Hong Kong’s most renowned pro-democracy activists, vowed to fight the “long term battle” for the city’s freedoms after his surprise release from jail on Monday morning.

Mr Wong, 22, who became the face of the “Occupy” movement five years ago when he was just a teenager, was freed from the Lai Chi Kok Correctional Institute halfway through a delayed two month sentence for obstructing the clearance of a major protest camp during the 2014 mass protests.

The exact reasons for his release remain unconfirmed, but the timing suggests Hong Kong’s authorities may have been seeking to ease public tension after what may have been the city’s largest rally since 1989, when citizens flooded the streets in support of Tiananmen Square activists.

Protest groups on Sunday claimed that two million people had clogged the streets of the financial hub, demanding the resignation of Hong Kong leader Carrie Lam and the scrapping of a controversial extradition law that leaves citizens vulnerable to being renditioned into China’s opaque justice system.

Granting the freedom of a charismatic youth leader at a time when the grassroots protest movement is building momentum was an unusual move by the Lam administration.