Image copyright NurPhoto via Getty Image caption Gotabhaya Rajapaksa was in power when the long-running civil war came to an end

Sri Lanka's new President Gotabaya Rajapaksa is a man who divides opinion.

On the one hand, he is hailed by supporters for playing a crucial role in crushing the Tamil Tiger separatist rebels and bringing to an end Sri Lanka's long-running civil war in 2009, when he was the defence secretary.

But he is also accused of committing human rights violations in the crackdown. He denies any wrongdoing.

Inevitably his return to power after Saturday's election has also caused ructions. Some analysts worry it may escalate ethnic tensions, while others hope his promises on security will bear fruit as Sri Lanka looks for calm as it recovers from the Easter Sunday bombings by militants linked to the Islamic State group this year, which killed more than 250 people.

But there are also others who wonder whether it is truly Mr Rajapaksa who will steer this island nation for the next five years.

Part of a powerful family

Mr Rajapaksa is part of one of Sri Lanka's most powerful families: his father was an MP and cabinet minister, while his elder brother Mahinda was Sri Lanka's president twice, and another two brothers have held high-ranking positions in previous administrations.

The fifth of nine children, he was born in 1949, and belongs to Sri Lanka's majority Sinhalese community.

He joined the army in 1971, training at the Sri Lanka Military Academy (SLMA).

For the next 20 years, he worked his way up the ranks, receiving a number of awards for gallantry, before leaving to work in IT.

Then, in 1998, Mr Rajapaska and his family moved to the US - returning in 2005, the year his brother Mahinda became president.

Under his brother's presidency, Gotabaya Rajapaksa was appointed the defence secretary in 2005 and again in 2010 - a role which would see him play a key part in Sri Lanka's history.

Image copyright NurPhoto via Getty Images Image caption Elder brother and former president Mahinda (left) was a big part of Gotabhaya's election campaigning

The brothers oversaw the military operation which ended the Tamil separatist conflict in 2009. It had lasted more than 25 years and is estimated to have claimed some 100,000 lives.

The end of the war was a moment to celebrate for most Sri Lankans, but the United Nations accused both sides of atrocities, especially during the final stages of the war in 2009.

There were numerous accounts of surrendering Tamil forces being killed even while waving white flags, or after being taken into custody. The video evidence of this is compelling, despite the government's strenuous denials.

The enforced disappearances continued into the years after the war ended, when businessmen, journalists and activists seen as opponents of the Rajapaksas were rounded up and never seen again.

The Rajapaksa government denied any role in the disappearances. Earlier this year, Gotabaya Rajapaksa told the BBC that war crimes allegations against him were "baseless" .

But it is his perceived tough stance on security a decade ago which may have given him a boost in the polls in 2019.

"We guarantee that there won't be room for extremist terrorism in this country again, just as we ended the terrorism before," he said on the campaign trail, adding he was the "only" one "capable of ensuring 100% security in the country".

Controversy

Alleged war crimes are not the only time Mr Rajapaksa has made the headlines for the wrong reasons.

Ahead of the 2019 election, questions were raised by political opponents over his eligibility but he has repeatedly maintained that he has given up his US citizenship.

Media playback is unsupported on your device Media caption How the army finally crushed Tamil Tiger rebels after 25 years of bloody war

In August 2016, he was charged with corruption involving the illegal transfer of state-owned weapons. He denied any wrongdoing.

And then there is the question of who is really in charge: analysts feel that a Gotabaya presidency is likely to become a Rajapaksa family affair, and will bring Mahinda - who could not contest the 2019 election due to Sri Lanka's presidential term limits - back into the limelight.

The signs certainly seemed to be there. Although Gotabaya was the candidate, Sri Lanka watchers noted that Mahinda featured prominently during his brother's election campaigning - including in publicity material - and even answered questions at press conferences.

Fears for the future

But behind the celebrations, many are worried about what Gotabaya Rajapaska's election will mean for Sri Lanka.

"The Rajapaksas have already used the Islamist bombings [on Easter Sunday] to fan the flame of Sinhalese nationalism…. The prospect of an alleged war criminal still wedded to extrajudicial methods becoming president rightly terrifies minority groups, the media and civil-liberties advocates," writer and analyst Brahma Chellaney said.

Others have warned "the Rajapaksa political playbook is based on mining ethnic fault lines".

Author Ana Pararajasingham, writing in The Diplomat, warned that a victory for Rajapaksa was "bound to have consequences for democracy in Sri Lanka".

Image copyright Getty Images Image caption Thousands of people disappeared in Sri Lanka during the civil war

Some media outlets also sounded the alarm bell.

State-owned Sunday Observer newspaper published a front-page editorial on 10 November titled "We fear Gotabaya", highlighting grave potential consequences to media freedom if he was elected.

"The Rajapaksa standing for election this time, was the defence secretary under whose watch journalists were killed and abducted and citizens exercising their democratic right to protest were shot to death… To Gotabaya Rajapaksa's die-hard followers, none of this matters. His alleged violent rule, is what makes him their champion," it wrote.

Reporting by Upasana Bhat with input from Maryam Azwer

BBC Monitoring reports and analyses news from TV, radio, web and print media around the world. You can follow BBC Monitoring on Twitter and Facebook.