Chennai: Putting up a spirited performance in the Assembly by-polls despite its Lok Sabha debacle, the ruling AIADMK in Tamil Nadu has won nine of the 22 segments where elections were held in two phases in April and May.

The DMK also made electoral inroads, as it added another 13 members to its existing number of 88, even as it has the support of nine of its allies including eight Congress legislators.

While the DMK enjoyed a 45.1% vote share in the by-polls, that of AIADMK's stood at 38.2%.

The vacancies to these 22 seats were created by reasons including the disqualification of 18 AIADMK MLAs in 2017. This, after they revolted against chief minister K Palaniswami who had merged the faction that was led by him with that of the faction led by deputy chief minister O Panneerselvam.

Counting of votes was on in some of the segments even through midnight on Thursday, and the results were declared later, according to the Election Commission. AIADMK and DMK won 9 and 13 seats respectively.

Among the seats won by the DMK is Thiruvarur, which was represented by the party chief M Karunanidhi till his demise in August 2018.

However, it is the AIADMK that could take solace from the performance as the Palaniswami government now has a strength of 123 legislators in the 234-member state Assembly, well past the simple majority mark of 117.

This could allow the ruling party to complete its term in 2021, unless there are some major political developments that could upset its applecart.

The AIADMK could go in for possible course corrections before the 2021 Assembly polls where it will face a formidable challenge from the rejuvenated arch-rival DMK, which is riding high on its Lok Sabha performance where the party-led coalition won 37 of the 38 seats in the state.