The pro-establishment candidate, Yan Chan, has won the Kowloon West Legislative Council by-election. Chan received 106,457 votes.
Her main rival, the pan-democrat Lee Cheuk-yan of the Labour Party, got 93,047 votes.
Former pro-democracy lawmaker Frederick Fung, who was running as an independent, polled 12,509. Two other candidates, Ng Dick-hay and Judy Tzeng polled 1,650 and 1,307 respectively.
The result is a blow for the pam-dems. If Lee had managed to win, they would regained their Legco veto in the geographical constituencies.
The by-election was for the seat of pan-democrat Lau Siu-lai. She was one of six pan-dem legislators disqualified for failing to take their Legislative Council oaths of office correctly in 2016.
Fung disagreed with the pan-democratic camp's decision to appoint Lee as the back-up for Lau.
While the counting was taking place, it appeared that Fung may have cost Lee the seat by splitting the pro-democracy vote. But when the final results came in, Yan still had about 900 more votes than Lee and Fung combined. Fung has denied splitting the vote.
Political analyst Li Pang-kwong from Lingnan University says the pro-democracy camp lost the seat because of infighting within the camp. But he says it's unfair to blame Fung, as he was entitled to put his name forward.
Chan was stronger than Lee in a number of districts with public housing estates. In Fu Cheong Estate in Nam Cheong for example, she got 850 votes more than Lee.
Similarly, disparities of around 700 votes between Chan and Lee were seen in a Kai Tak public housing estate where there was a lead-tainted water scandal, as well as Ka Wai Chuen in Hung Hom, part of which is a public rental housing estate.
In spite of the rainy weather, Sunday's turnout of 44.4 per cent was slightly higher than the March 2018 West Kowloon by-election turnout of 44.31 per cent. But it was over 13 percentage points lower than in the Legco election there in 2016, where the turnout rate was 58.13 per cent or 283,754 votes.