Maithripala Sirisena, the 63-year-old career politician who is now Sri Lanka’s president elect, knows how to keep his cards close to his chest.

While he was still health minister in the government of incumbent Mahinda Rajapaksa, he had dinner with the man he has just ousted the eve of the launch of his surprise campaign.

As the men tucked into a traditional Sri Lankan dinner of rice pancakes and curry, Sirisena gave no indication of what he was about to do: declare a candidacy that would unite the fragmented opposition in a high-risk gamble against entrenched and ruthless opponents.

“I felt sorry for [Rajapaksa] but could not stay anymore with a leader who had plundered the country, government and national wealth,” the president elect later said.

Rajapaksa claimed he had been “stabbed in the back.”

But the “traitor”, who was also general secretary of the Sri Lankan Freedom Party, is a canny political operator who has survived the tumultuous politics of the island nation for 25 years.

Sirisena’s first taste of activism came in 1968 when, still a teenager, he joined an anti-government rally that was organised by a communist party and broken up by a police baton charge. Three years later he was jailed for 15 months for alleged involvement in an insurrection led by Marxists.

The son of a minor landowner, Sirisena first won a seat in parliament in 1989. He negotiated shifts of power as early political patrons were marginalised to hold positions as agriculture, health and defence minister.

No one expected him to try and oust Rajapaksa. The last loyalist who made an attempt – the general who commanded the bloody but successful offensive which destroyed the violent Tamil Tiger separatist group in 2009 – ended up in prison.

Sirisena, a clean living teetotaler and practising Buddhist with a reputation for honesty and hard work, sensed an opportunity however. His own apparent probity was a contrast with an administration increasingly known for graft and nepotism, which had failed, too, to deliver benefits of brisk economic growth to Rajapaksa’s key voters in Sri Lanka: the conservative Sinhala-majority rural constituency.

Also Sinhala, Sirisena has the same rural appeal. He has a degree in agriculture and is from the ancient medieval capital Polonnaruwa in North Central Province, described as the rice bowl of Sri Lanka. If Rajapaksa, son of a successful politician, has adopted elements of peasant dress for political reasons – such as his traditional scarf – Sirisena has reportedly never been seen in a suit. Crucially, though he has none of the former president’s folksy bonhomie, he does not appear part of the Colombo political elite.

Sirisena’s calculation was that he could win over the key Sinhala voters by offering an alternative to the increasingly authoritarian and apparently dynastic rule of the Rajapaksa family while gaining the default vote of the country’s ethnic and religious minorities. Tamils and Muslims have been alienated by the incumbent’s hardline on post-war reconciliation and growing sectarian violence.

As today’s result shows, this was a fine judgement.

The key questions now are can the opposition alliance can hold together and keep power, and, if so, how much will Sirisena actually change?

He has pledged to rebalance executive power by reinforcing Sri Lanka’s judiciary and parliament, to fight corruption and to investigate allegations of war crimes from 2009.

He has also promised to make Ranil Wickremesinghe, a veteran opponent of the Rajapaksas and skilled political operator, prime minister.

But he is committed to the former administration’s broad economic policies and has made few concessions to the Tamil minority. This may have been for electoral reasons, or may be because he shares more with the outgoing ruler than some would like to hope.