Mahinda Rajapaksa resigned on Monday, his spokesman said, shortly after violent clashes between his supporters and anti-government protesters left 78 injured.
The 76-year-old official sent his letter of resignation to his younger brother, President Gotabaya Rajapaksa, paving the way for a "new unity government," spokesman Rohan Weliwita said.
Sri Lankan police decreed a curfew in Colombo, the capital, after the clashes.
Government supporters participated in a meeting that included the intervention of the prime minister and brother of the current president, before a crowd decided to walk towards the campsites near the official residence of the prime minister and the presidential secretariat where for a month thousands of people ask for the resignation of the Executive.
Two witnesses, who requested anonymity, said Rajapaksa supporters, armed with sticks and iron bars, attacked dozens of protesters before smashing several tents in the encampment.
"They attacked with sticks while shouting offensive words," one protester told reporters as his nose bled and he claimed police witnessed the riots.
Sri Lankan police used water cannons and tear gas to disperse the crowd, and tightened security in the presidential area to prevent further violence.
For months, this small island country of 22 million inhabitants in South Asia, independent since 1948, has suffered from serious shortages of food, fuel and medicine.
The economic collapse began to be felt after the coronavirus pandemic
cut off income from tourism and remittances.
The protesters had been demanding the resignation of the president for weeks, accused of causing the crisis.
The country decreed a state of emergency last Friday with the aim of reducing the protests, which, however, intensified over the weekend due to the lack of basic goods and gas for cooking.
Conforms to The Trust Project criteria