Though dubbed as the "war hero", the role of Rajapaksa in ending the conflict with the Liberation Tigers of Tamil Eelam with the death of its supremo Velupillai Prabhakaran in 2009 is quite divisive as he stands accused of violating human rights, a charge he vehemently denies.
Gotabaya Rajapaksa, once considered a "war hero" by the Sinhalese Buddhist majority for crushing the Liberation Tigers of Tamil Eelam and ending the nearly 30-year civil war, is now detested by the same people who dramatically stormed his official residence over Sri Lanka's worst economic crisis following which he fled the country in the middle of the night.
The 73-year-old politician and younger brother of former prime minister Mahinda Rajapaksa, is a former military officer who attended the counter-insurgency and jungle warfare school in Assam in 1980.
He was the first person with a military background to be elected as Sri Lanka's President in 2019 with a huge mandate.
His resignation comes days after thousands of protesters stormed his official residence, blaming him for the island nation's unprecedented economic turmoil since its independence from Britain in 1948.
The economic crisis is caused in part by a lack of foreign currency, which has meant that the country cannot afford to pay for imports of staple foods and fuel, leading to acute shortages and very high prices.
Under mounting pressure, President Rajapaksa first dropped his older brother Chamal and the eldest nephew Namal from the Cabinet in mid-April. Later, Prime Minister Mahinda also resigned after his supporters attacked anti-government protesters, triggering violence against the Rajapaksa family loyalists in many parts of the country.
President Rajapaksa tried to tackle the crisis for a few weeks along with Prime Minister Ranil Wickremesinghe before he was forced to flee his official residence in the face of massive protests over the economic crisis that has brought Sri Lanka to its knees.
From an undisclosed location, President Rajapaksa informed Parliament Speaker Mahinda Yapa Abeywardena about his decision to step down late Saturday night.
He, however, fled to the Maldives without resigning from his office. From Maldives, he went to Singapore which "allowed" him to enter into the city-state on a "private visit".
President Rajapaksa sent his resignation letter to the Speaker after reaching Singapore.
Rajapaksa, who served as the defence secretary during his elder brother Mahinda's tenure as president from 2005 to 2014, was voted to presidency by Sri Lankans who became worried about Islamic extremism in the Buddhist-majority country following the Easter bombings on April 21, 2019 that killed more than 250 people.
Though dubbed as the "war hero", the role of Rajapaksa in ending the conflict with the Liberation Tigers of Tamil Eelam with the death of its supremo Velupillai Prabhakaran in 2009 is quite divisive as he stands accused of violating human rights, a charge he vehemently denies.
Rajapaksa took oath as president at the sacred Buddhist temple Ruwanwelisaya in Anuradhapura - an ancient temple built by Sinhalese King Dutugemenu who is best known for defeating an invading Tamil king.
His swearing-in ceremony indicated the president's leaning towards Sinhalese Buddhist dominance in the island where Hindus and Muslims together constitute approximately 20 per cent of the total population.
Rajapaksa is accused of overseeing torturing and indiscriminate killings of both civilians and combatants, and later of political assassinations.
He and his brother Mahinda are also accused of condoning sexual violence and extrajudicial killings allegedly by Lankan security forces during the war.
Rajapaksa, who was a top target of the Tamil Tigers, survived an assassination attempt in December 2006 by an LTTE suicide bomber.
He is also considered to be tilted towards cash-rich China.
During his brother Mahinda's regime, China started investing heavily in infrastructure projects in the island nation as Lanka faced international isolation at the tail end of the civil war.
Critics say it was due to Mahinda that the country has fallen into the "Chinese debt trap".
The Hambantota port, which was funded by a Chinese loan during Mahinda's regime, was leased to Beijing in a 99-year debt-for-equity swap in 2017 after the country failed to pay off the debt.
Sri Lanka has historically been an important commercial hub along maritime routes due to its strategic position in the Indian Ocean, where China is increasingly making its inroads.
Born on June 20, 1949, in Palatuwa in Matara district, Rajapaksa, who hails from a high-profile political family, is the fifth of nine siblings.
His father D A Rajapaksa was a prominent politician in 1960's in the Wijeyananda Dahanayake government and also a founding member of the Sri Lanka Freedom Party.
Rajapaksa obtained his primary and secondary education at Ananda College in Colombo and obtained a postgraduate degree in Information Technology from the University of Colombo in 1992.
He joined the Ceylon Army as a Cadet Officer in 1971.
In 1983, he also gained a masters in Defence Studies from the University of Madras.
In 1991, he was appointed Deputy Commandant of the Sir John Kotelawala Defence Academy and held the position until his early retirement from the army in 1992.
During his 20 years of military service, Rajapaksa received awards for gallantry from three Lankan presidents - J R Jayewardene, Ranasinghe Premadasa and D B Wijetunga.
Following his retirement, Rajapaksa pursued a postgraduate diploma in Information Technology from the University of Colombo. Later he joined Informatics, a Colombo-based IT firm as its marketing manager. Subsequently, he migrated to the US in 1998 and worked at the Loyola Law School in Los Angeles as an IT professional.
In 2005, he returned to Sri Lanka to assist his brother Mahinda's presidential election campaign. During that time, he obtained dual citizenship from Sri Lanka.
He was appointed to the post of defence secretary in November 2005 by then newly elected president Mahinda. In this capacity, he oversaw the military operation which eventually defeated the LTTE in May 2009 and earned him the tag of a "war hero".
Rajapaksa is married and has a son.
Colombo Celebrates As Rajapaksa Quits
Dom's Take: Run Gota Run
Gotabaya's Parting Gift: A Lot Of Gas
Beware, The Wrath Of The People!