* Vote seen as index of support for city's chief executive
* Campaign marked by brutal attacks on candidates
* First results expected before midnight
Polls closed in Hong Kong with no major disruptions on Sunday after people turned out in huge numbes to vote in district council elections seen as a test of support for chief executive Carrie Lam following six months of pro-democracy protests.
Government data released one hour before polling stations closed said nearly 2.9 million people had voted by 9:30pm, a turnout rate of more than 69% - a record showing that appeared to have been encouraged by the political turmoil. About 1.47 million voted in the last district elections four years ago.
First results were due after midnight.
The voter numbers showed people's determination, said one voter named Tsz, 30, who works in the service industry.
"The high turnout rate...definitely reflects Hong Kong people's hope for genuine universal suffrage," he said.
Casting her ballot, the Beijing-backed Lam pledged that her government would listen "more intensively" to the views of district councils in the Chinese-ruled city.
"I hope this kind of stability and calm is not only for today's election, but to show that everyone does not want Hong Kong to fall into a chaotic situation again," Lam said.
The protests started over a now-withdrawn extradition bill that would have allowed people to be sent to mainland China for trial but rapidly evolved into calls for full democracy, posing the biggest popular challenge to Chinese President Xi Jinping since he came to power in 2012.
They have at times forced the closure of government, businesses and schools as police used tear gas, rubber bullets and water cannon in response to petrol bombs and rocks.
The run-up to the election was marked by attacks on candidates, with one stabbed and wounded and another having part of his ear bitten off.
Ming Lee, 26, who works in event production, said she hoped the higher turnout would benefit the pro-democracy camp that is battling some seats that were once uncontested and dominated by pro-Beijing candidates.
"I hope this vote can counter the voice of the pro-establishment, so as to bring in more voices from the democrats," she said. "The social problems encouraged people to vote and to focus on political issues."
The district councils control some spending and decide issues such as recycling and public health. A record 1,104 candidates were vying for 452 seats and a record 4.1 million people have enrolled to vote.
If the pro-democracy campaigners gain control, they could secure six seats on Hong Kong's semi-representative Legislative Council and 117 seats on the 1,200-member panel that selects its chief executive.
Jimmy Sham, a candidate for the Civil Human Rights Front, which organised some of the anti-government rallies, said:
"We don't know yet, at the end of the day, if the democrats can win a majority. But I hope our Hong Kong citizens can vote for the future of Hong Kong."
Restaurant manager Jeremy Chan, 55, saw the elections as offering Beijing supporters a chance to share their opinions.
"They believe they are fighting for democracy, fighting for Hong Kong, but the rioters only listen to what they want to hear," Chan said, citing vandalism of businesses seen as pro-Beijing. "Freedom of speech is lost."
Sunday was also the seventh day of a stand-off at Polytechnic University, whose campus has been surrounded by police as some protesters hid out on the grounds.
"The district council election is almost like a referendum on recent months of social activity," said a protester clad in a red university tracksuit, his face covered by a red mask.
"My personal liberty to vote has been violated," said the protester, who fears being seized by police if he tries to escape from the campus.
Demonstrators are angry at what they see as Chinese meddling in the freedoms promised to the former British colony when it returned to Chinese rule in 1997. They say they are also responding to perceived police brutality.
China denies interfering and says it is committed to the "one country, two systems" formula for the autonomy of Hong Kong. Police say they have shown restraint in the face of potentially deadly attacks.
Electoral affairs chief Barnabus Fung said there had been 3,638 complaints on Sunday, mostly related to the long queues at polling stations, which he put down to the large numbers voting.
Well-known pro-democracy advocate Alexandra "Grandma" Wong, who was detained in the city of Shenzhen over the border from Hong Kong in August, said this was "the day that we are longing for".
"Because I was detained in Shenzhen, my ballot has become a wasted paper. This breaks my heart. Please help add oil for me and vote. All the Best!!! Be Safe!!!" she wrote according to a message on the Lennon Wall protest movement Facebook page.
It was not clear for how long Wong, who became a fixture at protests carrying a large British Union Jack flag, was detained.