COLOMBO, Sri Lanka — As the guests sat down for a banquet dinner last summer at the grand colonial-era home of Sri Lanka’s president, the small talk soon turned gravely serious.
Addressing members of the ruling coalition, the country’s energy minister, Udaya Gammanpila, defended a small increase in fuel prices that was intended to address a critical shortage of dollars the island nation needed to import fuel, medicine and other necessities.
The president, Gotabaya Rajapaksa, and his brother Mahinda, the prime minister, had come on board with the measure after a year of discussion. But another member of the family — Basil, the finance minister, one of five Rajapaksas in the cabinet — had other ideas.
Before the guests made their way to the dance floor, Basil Rajapaksa rose to declare that Sri Lanka was not in fact suffering from a foreign currency crisis, according to Mr. Gammanpila and another person present. Criminals, he claimed, were funneling dollars out of the country’s banking system. Give him two weeks, he said, and he would fix it.
He would not. Nearly a year later, Sri Lanka lies in economic ruin, with basic food items scarce, hospitals out of medicine and lines for fuel stretching for blocks as the country’s foreign reserves all but run out. The wave of anger now gripping the country is as much about the family dynasty ruling Sri Lanka as it is about the economic disaster. Once empowered by a triumphant Buddhist Sinhalese nationalism after a brutal civil war, the Rajapaksas have been undone by what their own allies call incompetence and denial.
Now, that dynasty, which has dominated the country for the greater part of two decades, is on the verge of an end, with most of the family in hiding at a military base and only the president clinging to power. The latest to go: Mahinda Rajapaksa, the patriarch and prime minister, who was evacuated from his home this week after setting off clashes that left eight people dead across the country.
Mr. Gammanpila, the energy minister, said that the Rajapaksas — especially Basil, a shadowy power broker before becoming finance minister — should have seen the disaster coming.
“Basil was not willing to accept the fact that this financial crisis will lead to an economic crisis, and unless we are going to solve it, that will lead to a political crisis,” he said.
“He controlled everything,” Mr. Gammanpila added, a sentiment repeated by other officials and diplomats, “and he knew nothing.”
That Sri Lanka was headed toward an economic crash had become increasingly clear to analysts in recent years. They warned that the country’s balance of payments and macroeconomic trends were out of alignment.
Over a period of decades, the small island nation of 22 million people had built a bloated state sector, robust social welfare programs that exceeded the country’s means, a large military and an elaborate series of postwar construction projects. As economic growth slowed, it kept borrowing to pay.
The economic stress increased as pandemic travel restrictions dried up tourism dollars. Then came a disastrous ban on chemical fertilizers, as the Rajapaksa government pushed organic farming at a time when climate change was already threatening harvests and food security.
As it became clearer that the government needed help from financial bodies like the International Monetary Fund, the Rajapaksas dragged their feet. Used to easy loans from allies like China, they were daunted by the strict expectations that come with such packages, officials and diplomats said.
The economic collapse engendered a sustained protest movement. At the main protest site, along the scenic Galle Face, which overlooks the Indian Ocean from the capital, Colombo, protesters have increasingly addressed subjects that most ethnic-majority Sinhalese once shied away from.
Many have described the root of the crisis as the impunity that the political and military elite enjoyed after a civil war rife with accusations of crimes against Sri Lanka’s minority Tamils. The war’s end initiated a majoritarian triumphalism, exploited by the Rajapaksas, that concealed the deeper economic troubles and bypassed reconciliation.
Members of their own party say that the Rajapaksas, buoyed by war and ethnic nationalism, felt an entitlement that was all the more glaring in the face of their weak governance.
Among the protesters were V.G.N. Damayanthi, 45, and her husband, N.P. Wickramarathna. As the economy crashed, she said, they lost their family business, a small takeaway restaurant that employed 15 people, and sold their house. Now they are surviving on money from selling their car.
What worried them most was the future of their three children, the oldest of whom will soon graduate with an I.T. degree.
“A bit of this was because of Covid,” she said, “but a large part of it was this family.”
The protests against the Rajapaksas were peaceful for weeks, and many demonstrators and analysts were surprised as the president, who had been accused of abuses as defense secretary during the civil war, responded with restraint.
But the anger peaked on Monday, when the prime minister, Mahinda Rajapaksa, turned what was meant to be a concession to the protesters — his resignation — into a conflagration that his brother is struggling to contain.
Mahinda Rajapaksa’s supporters, bused to his residence, walked out and attacked peaceful protesters who had camped there for weeks through heat and monsoon downpours.
The assault unleashed a wave of anger and violence, with mobs torching dozens of homes belonging to members of the ruling party. In Colombo, some supporters of the prime minister were forced to jump into a lake and flee to safety on swan boats.
“The president had watched it on television,” said Nalaka Godahewa, a former cabinet minister who was with Gotabaya Rajapaksa when his brother’s supporters marched on the protesters.
“When I entered, he was screaming on the phone to the inspector general of the police — that why did you allow these people to come in,” he said. “But by then the people had entered, so he ordered him to use water cannons, rubber bullets, whatever force to chase them away.”
Mr. Godahewa, whose home was also burned down, said he remained at the president’s residence for much of the night as anarchy took hold. At Temple Trees, the old colonial compound where the prime minister lives, protesters broke the gates and forced their way in.
The president was said to be furious: He was working the phones to get the army to control a mess unleashed by his brother, while also helping that same brother evacuate with his family.
Officials and members of the ruling party said in interviews that the episode was an indication of the rifts between the two brothers and their circles. (Members of the Rajapaksa family, as well as their official representatives, did not respond to requests for comment.)
Mahinda Rajapaksa, 76, a former president described as increasingly enfeebled by those who have seen him in recent months, felt sidelined by a younger brother he thought he had made president. Gotabaya Rajapaksa, the president, 72, was trying to find his own ground after realizing his brothers had taken advantage of his political inexperience to introduce disastrous policies in his name.
The prime minister’s supporters, said Charitha Herath, a lawmaker from the governing party, “thought that they could get rid of these protests and they could prove to the president that he was not acting, but it backfired.”
In the days since, the president has tightened a curfew, ordering the security forces to shoot on sight to stop vandalism and arson. In a televised address on Wednesday, he condemned the assault on the protesters and the violence that ensued, and promised to curtail his own sweeping powers. He also announced a new prime minister, bringing back Ranil Wickremesinghe for his sixth time on the job.
Whether the president can hold on for the remaining two years of his term may be determined by how far the military goes in backing him.
A former army colonel, Mr. Rajapaksa has protected the military, shielding officers from war crime investigations and rewarding loyalists with cushy civilian jobs.
Hemasiri Fernando, a former defense secretary, said that the military had calculated its own interests, and that the economic crisis was too widespread, also affecting the families of those in the military, for officers to blindly support the president despite the public anger.
“They understand the hardship, because they are facing it too,” Mr. Fernando said.