Chaos engulfed Sudan on Saturday as forces led by two rival generals engaged in ferocious battles for the capital, Khartoum, and other parts of the country, with both sides fighting for control of the presidential palace, the main airport and other key sites.

The eruption of violence dashed hopes that military leaders would cede power to a democratic government led by civilians. It comes four years after Sudan seized the world’s attention when protests toppled the country’s authoritarian leader, President Omar Hassan al-Bashir, offering hope to similar movements in Africa and the Arab world.

Africa’s third-largest country by area, Sudan, with more than 45 million people, sits at a strategic spot just south of Egypt in Africa’s northeast.

In recent years, Sudan, a member of the Arab League, has become a flashpoint in a battle for influence between Russia and Western powers, particularly the United States.

The private Russian military company Wagner has sent operatives to Sudan to prop up the military government, and also runs a major gold mining concession there. The Kremlin has pressed Sudan for permission to allow Russian warships to dock at ports on the country’s Red Sea coastline.

Expressing alarm at the fighting, the U.S. secretary of state, Antony J. Blinken, said on Twitter Saturday that he was “deeply concerned” by the violence in Sudan and urged both sides to “immediately” cease hostilities and avoid further escalations.

The mayhem was a major blow to American, United Nations, African Union, Arab League and other foreign officials who had been scrambling this past week to head off the possibility of just such clashes. American officials had been pressing Sudan’s military to put the country back on the path to democracy, 18 months after generals seized power in a coup.

Gen. Abdel Fattah al-Burhan is a powerful military commander who has for years been a de facto leader of Sudan. He leads one of the two main rival factions now battling for control of the country.

Little known before 2019, General al-Burhan rose to power in the tumultuous aftermath of the military-led coup that ousted Mr. al-Bashir, the authoritarian leader who was deposed after popular uprisings consumed the country that year.

Then the inspector general of the armed forces, Mr. al-Burhan had also served as a regional army commander in Darfur, in western Sudan, when 300,000 people were killed and millions of others displaced in fighting from 2003 to 2008 that drew worldwide condemnation for its humanitarian toll.

General al-Burhan had been closely aligned with Mr. al-Bashir. But when Mr. al-Bashir was ousted, his defense minister, Lt. Gen. Awad Mohamed Ahmed Ibn Auf, took over control of the country, pushing protesters to successfully demand his resignation. General al-Burhan replaced him, becoming the most powerful leader of the country in a tenuous transitional period. While Western governments hoped Sudan would move toward democracy, General al-Burhan instead went on to progressively tighten his grip.

After civilians and the military signed a power-sharing agreement in 2019, General al-Burhan became the chairman of the Sovereignty Council, a body created to oversee the country’s transition to democratic rule. But as the date for the handover of control to civilians got closer in late 2021, General al-Burhan proved reluctant to hand over power. On Oct. 25, 2021, he carried out the coup that ousted the civilian government and its prime minister.

General al-Burhan is battling for control of Sudan with Lt. Gen. Mohamed Hamdan, who leads the country’s Rapid Support Forces, a powerful paramilitary group.

Of humble origins, General Hamdan, widely known as Hemeti, rose to prominence as a commander of the notorious janjaweed militias responsible for the worst atrocities of the conflict in Darfur. His success in crushing the revolt there earned him the favor of Mr. al-Bashir, who in 2013 appointed as head of the newly created Rapid Support Forces.

In October 2021, General al-Burhan and General Hamdan united to seize power in a coup, making them effectively the leader and deputy leader of Sudan. But in recent months, they have publicly fallen out, clashing in public and quietly deploying extra troops and equipment to military camps in Khartoum and across the country.

American and other foreign officials had been leading efforts to persuade the two generals to transfer power to a civilian-led government. Instead, they are now clashing violently.

General Hamdan has blamed General al-Burhan for the violence now engulfing Sudan.

“We are sorry to be fighting our countrymen, but this criminal is the one who forced us to do it,” he told Al Jazeera in an interview.

Reporting was contributed by Declan Walsh and Abdi Latif Dahir.