CAIRO — As deadly clashes intensified Monday between thousands of protesters and riot police, Egypt’s interim government offered to resign in an attempt to calm three consecutive days of unrest that have shaken the country ahead of next week’s parliamentary elections.

It was unclear if the ruling Supreme Council of the Armed Forces would accept the Cabinet’s offer to step aside, which would severely undermine the military’s legitimacy. It was unlikely that resignations would have appeased protesters whose main target of derision has been the ruling generals and their refusal to hand power over to a new democracy.

The interim government led by Prime Minister Essam Sharaf, who has offered to step down before, was installed in March and quickly fell out of favor with activists and political groups. The resignation offers came as battles between protesters and security forces intensified around the Interior Ministry in Cairo. Police fired tear gas and rubber bullets at mobs surging toward the long reviled symbol of state oppression.

The streets leading from Tahrir Square toward the ministry were streaked with flags and banners as protesters rushed forward only to be beaten back by batons. The violence, which so far has killed at least 24 people and injured more than 1,400, has further unnerved a nation whose democratic ambitions after the fall of Hosni Mubarak in February have been stalled.

The country is edging closer to a perilous crossroads. Protesters across Egypt are demanding that the military immediately hand over power to a civilian government. The military, which has called an emergency meeting of all political parties on Tuesday, is warning that a new revolt will not be tolerated. After months of suspicions between politicians, generals and activists, there is lit tle common ground on which to negotiate an end to the crisis.

The scene in the square for much of Monday was reminiscent of last winter’s uprising, but it was more sullen, lacking the infectious enthusiasm that swept through the crowds during the final days of Mubarak’s regime. In a sense, the military, revered by protesters in February as the protector of the revolution, had become the betrayer of Egypt’s “Arab Spring” by refusing to cede power to a civilian government.

Cheers rose from the square at news of the cabinet’s resignation offer. But sentiments held by many protesters, whose numbers rose from about 4,000 to tens of thousands by nightfall, went beyond their frustration with the military to what they also see as failures by religious and political factions. The major secular and Islamist parties have not officially endorsed the protests for fea r the clashes would be a dangerous diversion to the elections that begin on Nov. 28.

The military has yet to “come up with a response to the current problems,” said Hend Abdel Hafiz, a medical student at Cairo University. “But politicians keep talking on TV shows about a civil state versus a religious state. They’ve totally abandoned the people’s main needs.

“For three days now we’ve been here objecting to police brutality and demanding our rights,” Hafiz said, “but none of the political parties has come to support us. They’ve lost any credit I ever had for them.”

The military attempted to convince protesters to depart the square over fears the nation’s economy, tourism industry and stock market would continue to tumble. The newspaper Al-Masry al-Youm reported that 63 flights had been canceled at the Cairo International Airport since Saturday.

Gen. Sayed Abbas, a representative of the ruling council, accused the demonstrators of provoking violence, saying they “have a right to protest, but we must stand between them and the Interior Ministry.”

He added that “unknown people” fired live ammunition at protesters from atop buildings in an attempt to ignite rancor between the military and the people.

Amnesty International said police forces “appeared to fire buckshot and rubber bullets into the crowds. Bodies in the Cairo morgue reportedly showed head and chest wounds from live ammunition, including shotgun wounds.”

On Monday, Tahrir Square was a battered landscape of ash piles and tossed emotions. Protesters wearing surgical masks, face cream and cotton jammed in their noses stormed down side streets toward the Interior Ministry. After encountering waves of tear gas, they hurled rocks and retreated, gasping and tumbling into the square’s central garden. Others carried the injured to a makeshift hospital in a mosque.

“Write on the wall of a prison cell,” protesters chanted. “Military rule is a shame.”

“Military rule is defunct, defunct,” others yelled. “Freedom, freedom.”

The chants mixed with gunfire and clanging of flimsy metal barricades echoed over the square and toward the Nile, where Mubarak’s charred ruling party headquarters loomed like a ghost, a reminder that the vestiges of the old regime, including the grip of the military, are not easily scoured away. The military will essentially control the new parliament at least until a new president is elected late next year or early 2013.

Thirty-seven political and activist groups, including the April 6th Youth Movement, issued a statement comparing the military to Mubarak’s police state: “We confirm our readiness to face all the forces that aim to abort the revolution, reproduce the old regime, or drag the country into chaos and turn the revolution into a military coup.”

Khaled Seddick, owner of a clothes shop, stood in the square waving an anti-military placard as doctors, with water bottles and pockets full of respiratory medication tended to those overcome by tear gas.

“We need a revolutionary government that would take over the country because no parliament will change anything under the military’s absolute power.”