Hongkongers have voted in an election seen as a test of public sentiment following a deadly fire that angered some in the city.

The government mounted a huge campaign to encourage residents to choose members of the Legislative Council (LegCo). All of the candidates have been vetted to ensure they are loyal to China.

Voter turnout was 31.9%, according to the city's electoral office. The last election in 2021 saw the administrative region's lowest-ever turnout of 30% amid widespread voter apathy.

This election took place as many were mourning a devastating fire in Hong Kong's Tai Po district last month that killed nearly 160 people.

Around 1.3 million voted out of around 4.1 million registered voters in the city, which has a population of more than seven million.

China earlier made sweeping changes to Hong Kong's electoral system to ensure only patriots could run for seats.

Beijing has said the changes, which were put in place after anti-government protests in 2019, were necessary to ensure stability in Hong Kong, but critics say they weakened democracy.

A total of 161 candidates competed for 90 seats in the LegCo, which acts as a mini parliament and can make and amend laws. Twenty of those are directly elected, while nearly half are picked by the pro-Beijing Election Committee and the rest chosen by special interest groups like business and trade.

This year, the government has blanketed the city with posters urging Hongkongers to head to the polls, while dangling freebies and shopping discounts.

After casting their vote, each person received a thank you card that could be redeemed for vouchers in selected shops and restaurants, or for beauty services, medical check-ups, and insurance policy premiums.

Political campaigning for the LegCo election was immediately suspended following the fire. Hong Kong Chief Executive John Lee insisted the LegCo election continued as planned as we must move forward before we can turn our grief into strength.

John P Burns, an emeritus professor and Chinese politics expert at the University of Hong Kong, noted that mobilising pro-establishment voters following the fire would be difficult, and low turnout was anticipated due to the context of the tragedy.

Authorities have ordered an investigation into what led to the fire and arrested 13 individuals on suspicion of manslaughter. They have also moved quickly to improve safety standards following criticism of building regulations in the wake of the deadly blaze.