Image copyright AP Image caption Huge numbers of people queued after the polls closed, amid accusations of poor planning

Votes are still being counted in Hong Kong after its first major election since the 2014 pro-democracy protests.

The announcement of full results was delayed by several hours because of the highest turnout since the handover to China in 1997.

But with some results coming in it looks as if pro-democracy groups could retain their one-third hold of seats, enabling them to veto bills.

Some 58% of 3.8 million voters turned out, compared with 45.2% in 2008.

The main parties competing are divided by their stances on the territory's relationship with Beijing.

The new generation of activists who want self-determination for Hong Kong also look set to win seats.

Candidates are competing for 70 seats on the Legislative Council, known as LegCo, which passes laws and budgets in the territory.

But only 35 constituency seats are directly elected by the population.

Another 30 seats represent particular professions or trades and can only be voted for people connected to the trade, just 6% of the population. A further five "super seats" are chosen by voters across the territory.

The vote does not elect the chief executive, who is the head of government, but many analysts believe the outcome of Sunday's vote could have an impact on whether China grants current leader CY Leung a second term in office.

Image copyright EPA

At the scene: Paul Moss, BBC News, Hong Kong

One polling station on Hong Kong Island had to remain open until 03:00 as locals queued to cast their votes.

Bleary-eyed candidates, political activists (and the odd bleary-eyed journalist) are now milling around at the Counting Centre, housed in the Asia World Expo Centre near Hong Kong Airport, waiting to hear the outcome.

Already, though, there have been hundreds of complaints about the election's conduct, from trivial worries that campaign posters were placed in forbidden areas, to more serious allegations of voters and candidate teams being intimidated.

The election explained in five insults

Hong Kong territory profile

Hong Kong's democracy debate

Media playback is unsupported on your device Media caption Rival groups have come up with colourful ways of referring to one another, as the BBC's Helier Cheung explains.

A preliminary result had been expected late on Sunday night, but a larger-than-expected turnout has created significant delays.

Huge queues snaked outside polling stations on Sunday and some people were unable to vote until nearly four hours after the polls had officially closed.

Speaking to the South China Morning Post, several people said they believed voting had been poorly planned.

Avery Ng, a radical activist, was restrained by police after he threw a sandwich at Mr Leung while the leader went to vote.

For two months in 2014 protesters demanded his resignation as the Occupy movement occupied major parts of the city and caused political upheaval while calling for the right to elect a leader directly.