Sri Lanka's President-elect Gotabaya Rajapaksa waves at supporters as he leaves the election commission office in Colombo on November 17, 2019.
CNN  — 

Sri Lanka’s former defense secretary Gotabaya Rajapaksa has been elected as the country’s new President, winning 52.2% of the vote, according to the chairman of Sri Lanka’s Election Commission.

A record 35 candidates competed to replace outgoing President Maithripala Sirisena, whose term was marred by the Easter bombings and a failed attempt to remove Prime Minister Ranil Wickremesinghe from office.

Rajapaksa’s main rival Sajith Premadasa secured 41.99% of the vote, and has conceded.

This is Sri Lanka’s first election since the deadly terror attacks in April, when a series of bombs ripped through churches and hotels in Sri Lanka on Easter Sunday, killing at least 290 people and injuring hundreds.

It was under Gotabaya’s elder brother, Mahinda Rajapaksa, that the Tamil Tigers were crushed, while Gotabaya served as his defense minister and oversaw the operation that ended the civil war in the country.

The bombings shattered an uneasy sense of security that had built slowly after the end of the 25-year civil war with Tamil separatists, and devastated a thriving tourism industry, that saw 2.33 million arrivals in 2018. They also sparked a return to interethnic strife, as hardline Sinhalese nationalists and Buddhist extremists were emboldened to attack the country’s Muslim minority.

Gotabaya’s brother, former President Mahinda Rajapaksa, currently leads the opposition in Parliament and is widely expected to vie for the post of Prime Minister when parliamentary elections are held in 2020.

CNN’s James Griffiths and Manveena Suri contributed to this report.