CAIRO – The Egyptian capital descended into near-anarchy Friday night as the government sent riot police, and then the army, to quell protests by tens of thousands of demonstrators determined to push President Hosni Mubarak from office.

By the end of the daylong battle, the protesters were still standing and the police were nowhere to be seen. Mubarak — who had not spoken publicly since the protests began Tuesday — made a televised speech after midnight, announcing that he had asked his Cabinet to resign. The move fell far short of protesters’ demands, and seemed likely to ensure that the anti-government demonstrations that have erupted here would continue.

President Barack Obama said a short time later that he had talked with the Egyptian president by phone after his speech and pressed Mubarak to make long-promised reforms. “What is needed are concrete steps to advance the rights of the Egyptian people,” Obama said.

“Surely, there will be difficult days to come, but the United States will continue to stand up for the rights of the Egyptian people and work with their government in pursuit of a future that is more just, more free and more hopeful,” Obama told reporters in the State Dining Room after speaking with the longtime leader from the White House. The half-hour phone call was initiated by the White House, according to The Associated Press.

It remained unclear late Friday what role the Egyptian military might play. Mubarak, a former air force officer, draws much of his strength from the military, and any decision by the armed forces to withdraw support would mean the certain end of his reign.

But unlike the police, which unleashed an arsenal of weapons against the demonstrators, the military did not take any immediate action, and protesters gleefully welcomed the soldiers’ arrival in a thundering of personnel carriers.

Protesters were honking horns in celebration and roaming freely through central parts of the city late in the evening, in defiance of a curfew. The night air was thick with black smoke and the sounds of explosions, gunshots and sirens; cries and occasional cheers echoed through the darkness.

The protests, which were launched in cities nationwide but were largest in Cairo, were the most serious in Egypt’s modern history. Protesters have called for Mubarak, who at 82 has ruled this country with an iron fist for 30 years, to give up his position, leave the country and allow fresh elections.

Success in ousting Mubarak would be a remarkable achievement for a group of demonstrators who have no charismatic leaders, little organization, and few clear objectives beyond removing this nation’s autocratic president and other members of his ruling clique.

Before this week, few thought a mass anti-government movement was possible in Egypt, a country that has little experience with democracy. But after Friday’s protests, the campaign to oust Mubarak only seems to be gathering strength.

Egyptian demonstrators are hoping to replicate the success of democracy advocates in Tunisia, who earlier this month ousted their autocratic president and sparked a wave of imitators across the region. Because Egypt has long been seen as the center of the Arab world, the end of Mubarak’s reign would reverberate particularly deeply.

The government had worked assiduously to keep the protests from happening. It took extraordinary measures to block communications, cutting all Internet connections and mobile phone networks. Overnight Thursday, dozens of opposition leaders were rounded up and arrested. At dawn Friday, thousands of riot police filled the streets of Cairo.

Mohamed ElBaradei, a political reform advocate and Nobel Peace Prize laureate who returned to Egypt from abroad to participate, was soaked with a water cannon and later placed under house arrest, the AP reported. ElBaradei, the former chief of the International Atomic Energy Agency, has said he wants to lead Egypt in a peaceful transition to democratic government.

The protests Friday were launched after midday prayers. Throughout the afternoon and evening, security services fired hundreds of tear-gas shells, gunned down unarmed protesters and beat them with clubs. Despite those efforts, the protesters continued to surge toward downtown Cairo and, after dark, began setting fire to police vehicles and government buildings, as well as the headquarters of the ruling National Democratic Party.

Until then, the protesters had largely refrained from initiating violence, choosing instead to chant slogans and wave Egyptian flags. When tear-gas canisters sailed toward them, protesters swooped in and tried to either throw them back or to cast them into the Nile.

Protesters vowed to continue their demonstrations until Mubarak leaves office.

“This is no longer a time of fear. It’s a time of change,” said Mohammed Nabil, a 35-year-old doctor who, like many, said he was participating in his first protest. “We want Mubarak to leave and end 30 years of oppression.”

Despite calls by Egypt’s main opposition party, the Muslim Brotherhood, for members to join the movement, this week’s protests have been decidedly secular. Demonstrators, most of whom appear to be members of the nation’s middle class, said their campaign has little to do with religion.

It was unclear how many protesters were killed or injured during Friday’s mayhem. At one point in Cairo, an armored personnel carrier steered directly into a swarm of demonstrators. A police officer firing from a hatch in the roof gunned down at least two men. When fellow protesters tried to drive the wounded men away, police stopped their vehicle, forced all able-bodied occupants out, and relentlessly beat them in the middle of the street.

In addition to calling for the ouster of their president, protesters also demanded that the U.S. government support their cause. Osama el-Ghazi Harb, a prominent Egyptian writer, held aloft an empty tear-gas canister that only minutes earlier had been fired at him and several hundred other protesters.

“I’m very sorry to say that it was made in the USA,” Harb said. “The U.S. must condemn this use of force and, at the proper moment, tell Mubarak to get out.”