A familiar face is back on walls across Sri Lanka. The country’s former president Mahinda Rajapaksa has been grinning from thousands of posters and billboards recently, palms pressed together in gratitude.

Voters delivered a shock repudiation of Rajapaksa’s government three years ago, as the UN investigated war crimes against Tamil civilians, dissidents disappeared in unmarked white vans and warnings were issued that Sri Lankan democracy was at risk.

In February, however, they gave the Buddhist nationalist leader’s new party a surprise victory in local government elections.

With polls for parliament and the presidency scheduled for two years’ time, the result has reaffirmed Rajapaksa as Sri Lanka’s most popular politician, and raised hopes among his supporters – and fears in others – that he may yet return to power.

The Rajapaksa-led opposition forced a no-confidence motion in parliament against the prime minister, Ranil Wickremasinghe, last week. It failed, but Wickremasinghe was criticised by several of his own ministers during the debate, widening cracks in the already fragile coalition government that turfed Rajapsaksa from office in 2015.

“We are heading towards a snap election,” said Namal Rajapaksa, an MP and the former president’s son and heir apparent. “The future of the coalition government is going to be very unstable. The president and the prime minister have no other option.”

Namal Rajapaksa, the former president’ son and heir apparent. Photograph: Dinuka Liyanawatte/Reuters

Campaign ads in the run-up to the February polls were stark. “Remember when winning a rugby match was punishable by death?” asked one United National party flyer, in reference to a murder allegedly linked to the Rajapaksa family. “Remember when white vans were a symbol of terror and repression?”

The resurgence of a leader with such heavy baggage is less surprising to close observers of Sri Lankan politics. “Rajapaksa never went away,” said Alan Keenan, a senior analyst with the International Crisis Group. “His shadow has loomed over this government, literally from the first day.”

It took an unlikely coalition to unseat Rajapaksa from the presidency in 2015. Appalled by a leader they regarded as breathtakingly corrupt and increasingly authoritarian, defectors from his own party forged an alliance with members of the opposition, campaigning on a unity platform of reviving civil society and tackling corruption.

In power, however, longtime political enemies have struggled to work together, finding they are united by little more than antipathy toward the former president. “The relationship between the president and prime minister is as bad as it could be,” Keenan said.

To win over minorities such as the Tamils, the current president, Maithripala Sirisena, promised to implement tough reforms, including to devolve power to regional governments, pursue the cases of those who disappeared during the Rajapaksa years, and reform the constitution to ensure no president could accrue the power of his predecessor.

Commentators in Colombo agree too much of that agenda has been shirked by a government afraid of challenging Buddhist nationalist sentiment in the country, and kicking off a wave of rightwing anger that could lift Rajapaksa and his family back into office.

Less lofty issues have also sapped the government’s support. The price of staples such as onions, fish and coconuts has increased steeply, while a decision to remove an uneconomical fertiliser subsidy has burned the agricultural sector, which still employs nearly one in three Sri Lankans.

“Mahinda looked after us,” said Gamaga Nona, a paddy and banana farmer in Madilla, a village on Sri Lanka’s south coast. Fertiliser was eight times cheaper under the Rajapaksa government, she said, and the change has nearly halved the annual profit of her family farm. “Now the fertiliser is delayed and sometimes we never get it.”

KA Karunanapala, another southern farmer, worries about Chinese influence in the region. The Sirasena government agreed last December to lease a new port in Hambantota to a Chinese state-owned corporation for 99 years. It was intended to help pay back about $8bn in Chinese money borrowed by the Rajapaksa government, but has provoked a furious backlash. “What does [Sirisena] do for us, other than going around trying to sell our assets?” Karunanapala asked.

Civil society groups in Colombo acknowledge a pall has lifted since 2015. Newspapers that once laboured under official censorship, or the kind enforced by military vehicles parked outside journalists’ homes at night, now print boisterous criticism of the government. Human rights groups chased out ten years ago are re-establishing offices in the city.

People are breathing more easily, said Asoka Obeyesekere, a barrister and director of the local chapter of Transparency International. “Civil society are not fearing for their lives anymore.”

Namal Rajapaksa calls the allegations of corruption and violence that dogged his father “well planned, well executed propaganda”. “We are looking for a fresh start,” he said. “We will correct our mistakes and look for a broader relationship with our neighbours.”

His party would seek a clean slate with western governments, he said, but added that continuing to participate in a UN security council investigation into the final months of the civil war – in which about 40,000 Tamil civilians may have been killed – would need to be “looked into more deeply”.

“Any war will have casualties, we won’t deny that,” Rajapaksa said. “But at the end of the day what matters is the future.”

That future is still uncertain for the family. Their party won about 45% of the vote in the local government elections, the largest share in the country, but not enough to win an outright parliamentary or presidential majority.

Should opposition groups find a way to paper over their differences, and unite as they did in 2015, they may still have the numbers to keep the Rajapaksas out.

“The local government results showed no other political force in the country can shine on their own,” Obeyesekere said. “Really the only way to have any strength is in unity.”