"Leave! Leave! Leave!" they chanted after bowing in prayer and listening to a cleric declare "We want the head of the regime removed".
He praised the "revolution of the young".
The United States, long the ally and sponsor of the 82-year-old former general and his politically influential army, was also working behind the scenes to have him hand over power.
Mubarak says he is willing to retire but, having spent three decades portraying himself as a bulwark against radical Islam in the most populous Arab state, he has warned of chaos if he goes now.
Doubtless fuelling Western -- and Israeli -- concerns about the rise of the Islamist movement the Muslim Brotherhood in any free Egyptian election, Iran's supreme leader Ayatollah Ali Khamenei hailed what he called an "Islamic liberation movement" across the Arab world, and urged Egypt's army to turn on Israel.
In Cairo, where protesters have come from a mix of secular and religious inspiration, many joined in repeating the Muslim rallying call on Friday of "Allahu akbar!", or God is greatest.
In Tahrir, or Liberation, Square, the focus of protests and of violent clashes with Mubarak loyalists in the previous two days, there was a festive atmosphere, with soldiers keeping order and the veteran defence minister, Field Marshal Mohamed Hussein Tantawi, paying a visit and talking to his soldiers.
"Today is the last day, today is the last day!" protesters shouted as Arabic pop songs blared from a bank of speakers and military helicopters clattered overhead. Ambulances stood by.
One banner, in English for the benefit of the international television channels beaming out live, read: "Game over."
Army out in force
Troops, out in greater numbers than in the previous week, strung barbed wire across streets and erected checkpoints, slowing people's ability to get to the square. Once weekly prayers end at mosques across the country, protest leaders were hoping they could declare they had put a million on the streets.
The long-banned Brotherhood has sought to allay Western and Israeli concerns about its potential to take power in a free vote.
A day after Mubarak's new vice president broke ground by saying the Brotherhood was welcome to join a national dialogue, it said it would not seek the presidency.
Iran's anti-Western, Islamic revolution of 1979 against the repressive, US-funded shah has been cited by some in Israel and the West as a possible precedent for Egypt.
Khamenei, whose non-Arab, Shi'ite clergy represent a different branch of Islam from the mainly Sunni Arabs, praised those in Tunisia and now Egypt who had wrought dramatic change in the past month on autocratic regimes typical of the Arab world.
"The awakening of the Islamic Egyptian people is an Islamic liberation movement and I, in the name of the Iranian government, salute the Egyptian people and the Tunisian people," Khamenei told worshippers at Friday prayers in Tehran.
Calling himself a "brother in religion" to the Arab people, he called on the Egyptian army to back the protesters and "focus its eyes on the Zionist enemy".
Cairo's 1979 peace treaty with Israel has been a key component of the Jewish state's security strategy.
The demonstrators, from across Egypt's diverse 80 million population, hope to match the unprecedented turnout on the streets of the nation's cities that they mobilised on Tuesday.
On that evening, Mubarak announced he would step down, but only in September, when a presidential election is due.
Though many Egyptians felt that was good enough, and hoped for a return to normality after the disruption which began on Jan 25, many want Mubarak to leave immediately.
The United States and its Western allies, while refraining from saying he must quit now, have urged him to begin the transition of power and move towards elections.
The armed forces, who have a crucial role to play, appear to be weighing their options, content to let demonstrators have their say in a way never before seen in Egypt.
But they have not moved directly against Mubarak, and have allowed plain clothes loyalists to range the streets and attack protesters this week.
A senior US official, who declined to be named, said on Thursday Washington was discussing with Egyptians different scenarios, including one in which Mubarak resigned immediately.
"That's one scenario," he said, speaking on condition of anonymity.
"There are a number of scenarios, but (it is) wrong to suggest we have discussed only one with the Egyptians."
Mubarak, however, said he believed his country still needed him: "If I resign today, there will be chaos," Mubarak, who has promised to step down in September, told US television channel ABC. Commenting on the calls to resign, he said: "I don't care what people say about me. Right now I care about my country."
The New York Times cited US officials and Arab diplomats as saying Washington was discussing a plan for Mubarak to hand over power to a transitional government headed by Vice President Omar Suleiman with the support of the Egyptian military.
It also quoted a senior Egyptian saying the constitution did not allow this.
"That's my technical answer," he added.
"My political answer is they should mind their own business."
Suleiman also hinted at irritation with US interference in a television interview on Thursday: "There are some abnormal ways by which foreign countries have intervened through press declarations and statements. This was very strange, given the friendly relations between us and them," he said.
Many of the protesters reject Suleiman as an alternative.
Amr Moussa, secretary general of the Arab League and former Egyptian foreign minister, said he believed Mubarak would hold on until September's election.
Then he added cautiously: "But there are extraordinary things happening, there's chaos and perhaps he will take another decision."
Moussa, spoken of by some as a possible successor, told France's Europe 1 radio that he would consider standing.
The UN estimates 300 people have died in the unrest which was inspired in part by protests in Tunisia which forced Tunisian strongman Zine al-Abidine Ben Ali to flee last month and which have since spread to other parts of the Middle East.