Rajapaksa's new political party, Sri Lanka People's Party (SLPP), defeated President Maithripala Sirisena's Sri Lanka Freedom Party (SLFP) and Prime Minister Ranil Wickremesinghe's United National Party (UNP), winning 225 councils or two thirds of the 340 councils which went to polls on Saturday.
The UNP won 41 councils while the SLFP was a distant third with just 11.
Rajapaksa's good show indicates that he may return to the big arena after being sidelined with his January 2015 loss to Sirisena in the presidential election.
The next general election is scheduled to be held after August 2020.
More From This Section
The former strongman, whose nearly a decade-long rule was ended by Sirisena in 2015, alleged that the unity government of SLFP and UNP has not provided a political stability to the country.
Terming the local council election a referendum on the unity government, Rajapaksa said the voters have rejected the programme of the government and they have no mandate now.
Since being defeated in the 2015 presidential election by Sirisena, Rajapaksa entered Parliament in the parliamentary election held later that year.
The two-time former president has been voted back with overwhelming support of the Sinhala Buddhist majority who view them as their hero for ending the 30 year separatist war of the LTTE.
In a statement, he thanked the voters and appealed for calm in celebrating the victory.
Sirisena was voted into office on the strength of support mainly from the minority Tamil and Muslin communities.
Sirisena faces a sterner challenge from his predecessor Rajapaksa. Sirisena's relationship with Wickremesinghe, his main supporter when he defeated Rajapaksa in the presidency in 2015, has soured in recent months.
Sirisena has targeted the Wickremesinghe's UNP, dubbing it even more corrupt than the Rajapaksa government of which Sirisena had walked out to become the then main Opposition challenger.