The two sides threw rocks and chunks of cement at each other, with several people reported injured. Soldiers posted around the square did not immediately intervene.
"We must leave. Egypt is divided. There will be war," one young girl wailed.
"A young man with the pro-Mubarak group sat on a railing and stared darkly at the anti-government crowds. "They will not sleep here tonight in Tahrir Square," he said.
With Mubarak promising to step down after elections this fall, military spokesman Ismail Etman said in a Wednesday morning television address that the protesters should focus on "returning normal life to Egypt."
"Your message has arrived, your demands became known," Etman said. The government-controlled station then broadcast a printed message that read: "The armed forces call on the protesters to go home for the sake of bringing back stability."
But large crowds continued to gather in downtown's vast Tahrir Square, and seemed unlikely to disband. Egyptian opposition leaders and pro-democracy demonstrators said Tuesday that they would continue to demand that Mubarak resign immediately. They were buoyed by President Obama's statement that a transition to democracy in Egypt "must begin now."
Shortly before noon Wednesday, Internet service was restored in Egypt, having been blocked by the government for several days in what turned out to be a futile attempt to prevent the demonstrations.
By mid-afternoon Wednesday, the crowd in Tahrir Square was being confronted by a distinct, apparently orchestrated burst of support for the embattled Mubarak, who throughout his tenure has been a key U.S. ally.
Thousands of supporters of the 82-year-old president were bused into what has been the central gathering place of the anti-Mubarak forces. There were also rallies in support of Mubarak overlooking the Nile River a short distance away.
Those arriving on buses in support of the president appeared to be all men - a sharp contrast to the many families, women and children participating in the much larger anti-government protests. The men rushed into the square, shouting "No to vandalism!" and began painting over anti-Mubarak graffiti with slogans like "Egypt = Mubarak."
Anti-government protesters marched toward the new arrivals, shouting "Down with Mubarak!" and "No to Mubarak!"
Countered the Mubarak supporters: "The people want to bring down the president!"
"We will not leave! You leave! You leave!" the anti-government masses shouted.
"Go home! Go home," the other side thundered back.
At least one man was pulled from the anti-government crowd by the pro-Mubarak demonstrators, who surrounded him. The man appeared frightened, and began to weep. Some of those demonstrating in support of Mubarak told CNN reporters that their bosses had ordered them to be there. But some said in interviews that the longtime president made them feel secure.
"For 30 years we have felt safe here in Egypt," said Hosam Hamdi. "My wife, my mother, my sister can all walk safely. I want to cry. Mubarak is not a bad person."
At a spot along the Nile, demonstrators shouted, "The people are with Mubarak. Mubarak is the father." Military police in riot helmets contained the passionate gathering, in a more visible display of force than had been seen Tuesday during the huge anti-Mubarak protest.
In Tahrir Square, protesters said Mubarak was trying to play for time, and divide the opposition by saying he would leave in eight months' time. "But all Egyptian people have seen the light," said Mahmoud Mohamad, 55.
Mohamad Omar, a 30-year-old pharmacist, dismissed the pro-Mubarak supporters as mostly members of the president's New Democratic Party who are worried about their jobs.
On Tuesday, a day when popular protests reached a new pitch, Mubarak's announcement left no doubt that time was running out on his three-decade reign as Egypt's president.
Mubarak said he would not be a candidate for a sixth term and promised "a peaceful transfer of power." But the hundreds of thousands of protesters who had gathered in downtown Cairo said they would not surrender what they believe is an unstoppable momentum toward toppling one of the Arab world's most durable leaders.
"He needs to leave right now. We've already waited 30 years, and we don't want to wait any more," said Amy Hashem, 23, who was among the thousands of demonstrators who have vowed to occupy Tahrir Square, Cairo's central plaza, until Mubarak leaves office.
"It would have been better for him to say, 'I love my people and I'm leaving,' " opposition leader Mohamed ElBaradei said in an interview after Mubarak's speech. "Unfortunately, this will just extend the period of instability."
A revolutionary spirit has seized Egypt over more than a week of mounting protests, and there were signs Tuesday that the sentiment was spreading. In Jordan, King Abdullah II fired his prime minister and cabinet after days of unrest over price increases.
But there were also indications that Mubarak's move might mollify some critics. Amr Moussa, a former Egyptian foreign minister who is considered likely to seek the presidency, called the announcement "a very important step" that "should be considered carefully."
Under growing pressure at home and abroad, Mubarak had been left with very little room to maneuver. His announcement will set off jockeying among potential successors, including ElBaradei and Moussa, who is now secretary general of the Arab League, as well as other candidates from a broad array of opposition factions, from liberal technocrats to more conservative Islamists.
With 80 million people, Egypt is the largest country in the Arab world, and developments here are being followed minute by minute by anxious leaders across the region. On Tuesday, leaders could not have liked what they saw.
The demonstration in Egypt was by far the largest since the protests began on Tuesday of last week, and the jubilant mood reflected a confidence among the crowds that Mubarak would soon be gone. The 82-year-old has long maintained his grip here through fear, but there was none in evidence Tuesday, with soldiers smiling as protesters peacefully filled Tahrir Square and surged beyond into downtown streets.
Protest organizers had vowed to bring a million people to the streets of Egypt, and while reliable crowd estimates were impossible to come by, the turnout was unquestionably impressive. The protests also attracted record crowds in cities across the country, and organizers said a nationwide strike would continue until Mubarak steps down.
In Tahrir, which means liberation in Arabic, flag-waving demonstrators held handwritten signs reading "checkmate." Groups of protesters furiously chanted against the president, their words reverberating across the city: "The pharaoh is finished!"
Among demonstrators, Mubarak's departure had seemed an impossibility a month ago, and became a whispered hope just last week. But on Tuesday, protesters spoke of it as inevitable and said they are in no mood to compromise. "The game is over. He can't save himself anymore," said Mohammed Hussein, 27, a physician.
The government's approach to the demonstrations has rapidly shifted. As of last week, protests were banned and the police used every tool in their arsenal to try to thwart them, including water cannons, tear gas and live bullets. More than 100 people died in vicious street clashes.
But when that heavy-handed approach failed, the government called in the army, which for several days remained officially mum on its plans while soldiers showed increasing solidarity with demonstrators. On Monday night, the army issued a statement calling the protesters' demands legitimate and vowing not to fire on their rally.
On Tuesday, the army stayed true to its word. Military helicopters buzzed overhead and troops worked with civilians to provide tight security, setting up ID checks and frisking stations at each entrance to the square.
Mubarak's Tuesday night announcement that he would not run followed another major concession Monday, when Omar Suleiman, the newly appointed vice president, said the government hoped to open negotiations with the opposition. Taken together, the moves suggest that government authorities are anxious for a resolution to a crisis that has paralyzed the nation.
Trading on the Egyptian stock market has been suspended since late last week, and most business has ground to a halt as shops have been shuttered and factory workers have walked off the job. The country's economy, which was already struggling, could be devastated if the standoff between Mubarak and the demonstrators continues for much longer.
Opposition parties have nominated ElBaradei to negotiate with the government, and ElBaradei has put himself forward as a candidate to lead a transitional authority.
Protesters on Tuesday said they were already looking past Mubarak, preemptively rejecting any members of his inner circle - including Suleiman - as their new president. But they have not coalesced behind an alternative, and they have studiously avoided associating with any candidate or party, saying Egypt first needs to settle on a plan for holding fair elections.
A presidential election was already scheduled for September, although under Mubarak the contests have been heavily rigged and the outcome has always been a foregone conclusion. Mubarak was widely expected to run, although he denied Tuesday night that he had planned to do so.
Protesters continued to demand that the United States take a more vocal role in supporting their movement, saying they are unswayed by the Obama administration's calls for an orderly transition of power.
Fears of an Islamist takeover of Egypt, the protesters say, are vastly overblown, and demonstrators have emphasized that the nation's minority Christian community has been heavily involved in their movement. Although members of the Muslim Brotherhood - the nation's best-organized opposition group - have turned up at the protests in greater numbers in recent days, the group is hardly driving the demonstrations.
"Washington has been very anxious about what's happening here, but it shouldn't be. It should be happy," said Mohammed Fouad, 29, a software engineer. "This will reduce terrorism. When people have their voice, they don't need to explode themselves."
If anything, the tone of the protests has been more nationalist than religious.
Protesters have proudly waved the Egyptian flag and swayed to the sound of the national anthem and other patriotic songs. Many said they have felt pride in their nation for the first time as they watched it do in the past eight days what countries in Europe, Asia, Africa and Latin America accomplished decades ago.
"For 30 years, people haven't seen anything good. Mubarak's a liar. He's corrupt. He's a robber," said Maher Abdul Azim, 58, a teacher. "But today, all of the Egyptian people have been reborn. Today, we have our freedom."
Correspondent Leila Fadel and special correspondents Samuel Sockol and Sherine Bayoumi contributed to this report.