Supporters of local candidate Kelvin Lam celebrate, after it was announced he won the local council elections in his district Image copyright Reuters
Image caption Supporters of a pro-democracy candidate celebrate as their victory in the district election was announced

Hong Kong's opposition pro-democracy movement has made major gains in the Chinese territory's district council elections, local media reports say.

It took 201 of the first 241 seats declared, according to the South China Morning Post newspaper. Pro-Beijing candidates took just 28.

More than 2.9m people voted, a turnout of more than 71%, against 47% in 2015.

The election was billed as a test of support for embattled Chief Executive Carrie Lam.

Pro-democracy protest groups wanted the vote to send a message to the Chinese government after five months of unrest and anti-government protests.

Pro-Beijing candidates had called on voters to support them in order to express frustration at the upheaval caused in recent months by continuous clashes between protesters and police.

Media playback is unsupported on your device

Media captionThe identity crisis behind Hong Kong's protests

A record 4.1 million people had registered to vote, or more than half the population of 7.4 million.

Hong Kong's district councillors mainly deal with local issues such as bus routes and garbage collection, but do have some influence in choosing the city's chief executive.

Casting her vote, Ms Lam promised to listen "more intensively" to the views of district councils.

What's the latest?

Some notable names ran in the elections, including pro-Beijing lawmaker Junius Ho, one of the most controversial politicians in the city, who suffered a shock defeat.

He was stabbed earlier this month by a man pretending to be a supporter. The lawmaker has openly voiced his support for Hong Kong's police force on multiple occasions. He was in July filmed shaking hands with a group of men - suspected of being triad gangsters - who later assaulted pro-democracy protesters.

Image copyright Getty Images
Image caption As results were announced, pro-democracy supporters were in high spirits in Tuen Mun district

Jimmy Sham, a political activist who has recently risen to prominence as the leader of the Civil Human Rights Front - a campaign group responsible for organising some of the mass protest marches - won a seat after running for the first time.

Mr Sham has also been attacked twice, once apparently with hammers. Photographs at the time showed him lying on the street covered in blood.

Standing on crutches, Mr Sham told Reuters news agency on Sunday that the election was "special because it is a formal confrontation between pro-establishment and pro-democracy parties".

Media playback is unsupported on your device

Media captionJoshua Wong says Beijing can't keep him down

Pro-democracy activist Joshua Wong was barred from running in the elections, a move he referred to as "political screening", but the pro-democracy candidate who replaced him is said to have won.

In a tweet, Mr Wong said the "historic" results showed that public opinion had not turned against the pro-democracy movement.

Reflecting on her reported defeat, pro-Beijing lawmaker Alice Mak suggested Ms Lam's administration was partly to blame.

"In the election campaign, pro-government candidates have been unfairly treated. This is a very important reason," she said.

Starry Lee Wai-king, chairwoman of the city's largest pro-Beijing party, was among the few establishment candidates to secure her seat.

"I think [Lee] is the only one who can survive the de facto referendum," said Leung Kwok-hung, her pro-democracy opponent in the poll.

'A wipeout beyond imagination'

Stephen McDonell, BBC China correspondent, in Hong Kong

Outside the Yau Ma Tei North polling station, local residents lined up to gain entry so they could watch the vote count. The doors opened and they poured into the public viewing area.

Six months into an ongoing political crisis, people have lost faith in government institutions. They wanted to make sure that this process was fair and transparent.

As they waited for the total in their own district council to be tallied, they could see the numbers coming in from elsewhere on their mobile phones.

By their facial expressions it was clear they couldn't believe what was unfolding, and people cheered in astonishment as one surprising result came in after another.

Nobody imagined such a comprehensive wipeout, and Carrie Lam's administration will no doubt come under renewed pressure to listen to the demands of protestors following such an overwhelming defeat for her and her allies.

More than 1,000 candidates ran for 452 district council seats which, for the first time, were all contested. A further 27 seats are allocated to representatives of rural districts.

Pro-Beijing parties held the majority of these seats ahead of the election.

Image copyright AFP
Image caption Chief Executive Carrie Lam welcomed the "peaceful environment" for the vote

Police were seen outside some polling stations and on the streets during Sunday's vote but correspondents said they kept a low profile.

"Facing the extremely challenging situation, I'm pleased to say... we have a relatively calm and peaceful environment for [the] election today," Ms Lam said after voting.

Under Hong Kong's electoral system, 117 of the district councillors will also sit on the 1,200-member committee that votes for the chief executive.

So a pro-democracy district win could translate eventually to a bigger share, and say, in who becomes the city's next leader.