Lesotho's Prime Minister Tom Thabane has dramatically boosted his share of directly-elected seats in the country's National Assembly, but he could still be ousted from power.
With the votes from Saturday's election now counted, the country's electoral commission reports that Thabane's All Basotho Convention (ABC) has won 40 of 80 directly-elected seats, compared to 26 in the 2012 election.
The ABC took an early lead in counting on Sunday, but as votes came in from remote mountain constituencies, the Democratic Congress of former prime minister Pakalitha Mosisili steadily improved its position, winning 37 seats in all. It won 41 seats in 2012.
However, that is not the end of the matter. Lesotho has a "mixed member proportional" (MMP) electoral system, in which another 40 seats in the assembly are allocated to parties on the basis of the proportion of votes they won across the country. For a party to rule alone, it needs more than 60 seats in all.
Also adopted by countries such as Germany and New Zealand, the MMP system is designed to overcome the exclusion from legislatures of smaller parties under the "first past the post" system used in countries such as Britain. Under that system, parties which have substantial support nationally but which run in second place in many constituencies are prevented from gaining representation commensurate with their overall support.
In Lesotho, the Democratic Congress has won more votes across the country than the ABC, and thus stands to gain when the extra 40 seats are allocated in the coming days.
In addition, the third-placed Lesotho Congress for Democracy (LCD), although it has only two directly-elected seats, and the Basotho National Party (BNP), with one seat, could pick up enough of the additional 40 seats to become king-makers in coalition talks.
The political crisis which forced Saturday's election to be called two years early was a consequence of a fall-out between Thabane and his LCD coalition partner last year, and the LCD has recently indicated a preference for joining the Democratic Congress in a new administration.
The outcome of the election thus hangs in the balance as electoral authorities calculate the allocation of the proportional seats - and as parties consider the options for another coalition government.