Pro-Beijing parties have kept their majority in Hong Kong's legislative council, winning 34 of the 60 seats on offer in Sunday's elections.
A radical pro-democracy activist, 'Long Hair', won a seat
Pro-democracy parties, which had been expected to do well, increased their seats by just three, winning 25.
There was a record turnout for the poll, which was seen as a test of public feeling towards Beijing's rule.
Former Democrat leader Martin Lee said the complicated voting system had favoured pro-China candidates.
Thirty of the Legislative Council (LegCo) seats were elected by popular vote, and the remaining 30 by special interest groups that have tended to favour the pro-Beijing camp.
HONG KONG RESULT
All 60 seats in Legislative Council elected
Pro-Beijing camp win 34 (last election: 34), including 12 directly elected (7)
Pro-democracy camp win 25 (22), including 18 directly elected (17)
Turnout was 56%
The BBC's Chris Hogg in Hong Kong says voters appear to have steered a middle way between the two camps.
He said Beijing's tactics in the run-up to the poll - offering economic incentives and events designed to promote patriotism, instead of attacking opposition candidates - seemed to have paid off.
Leading pro-Beijing politician, Tsang Yok-sing, said voters had opted for stability.
"The message we got from voters in the past few weeks is that many want ... a stable, harmonious environment," he said.
A shortage of ballot boxes led to claims of improper procedures
Pro-democracy candidates won 18 of the 30 directly elected seats, while pro-China candidates did well in the so-called functional constituencies.
These are reserved for trade and professional bodies like accountants and bankers, and tend to elect pro-establishment politicians wary of antagonising China.
The pro-democracy parties said they were disappointed with their showing, which analysts said could have been affected by a series of recent scandals.
"I am disappointed. It shows how unacceptable the electoral
system is," said Martin Lee, former chairman of the Democratic
Party, who was himself re-elected.
One winner was radical pro-democracy activist Leung
Kwok-hung, better known as "Long Hair", who is a regular heckler of the government.
"I'll demonstrate my electorate's dissatisfaction towards
this minority-chosen government by protesting in the council in
my special way," he told Cable Television.
Around 1.7m people - 56% of eliglible voters - took part in Sunday's vote.
There were 200,000 more voters than the previous record turnout, eight years ago.
Analysts said it was the most fiercely fought election since the territory was handed back to China seven years ago.
The vote had been seen as a referendum on the aspirations of some Hong Kong residents for more democracy.