At least three people are reported to have been killed during a day of rare anti-government protests in Egypt.
In Cairo, where the biggest rallies were held, state TV said a policeman had died in clashes. Two protesters died in Suez, doctors there said.
Thousands joined the protests after an internet campaign inspired by the uprising in Tunisia.
In central Cairo, police starting using tear gas early on Wednesday in an attempt to disperse the crowds.
Thousands of demonstrators remained in the city centre around Tahrir Square late into the night, vowing to camp out overnight.
There were appeals on Facebook for food and blankets for those staying put.
But police moved in at 0100 local time (2300 GMT Tuesday), using tear gas and driving protesters into nearby streets, with reports that some people were beaten by police.
As dawn neared, Tahrir Square was reported to be empty of demonstrators, with cleaners removing rocks and litter as police looked on.
Activists had called for a "day of revolt" in a web message. Protests are uncommon in Egypt, which President Hosni Mubarak has ruled since 1981, tolerating little dissent.
US Secretary of State Hillary Clinton said her administration supported "the fundamental right of expression and assembly" and urged all parties "to exercise restraint".
She added that Washington believed the Egyptian government was "stable" and "looking for ways to respond to the legitimate needs and interests of the Egyptian people".
The events in Cairo were co-ordinated on a Facebook page - tens of thousands of supporters clicked on the page to say they would take part.
The microblogging website, Twitter, has confirmed that its website has been blocked in Egypt.
Twitter said it believed the open exchange of information and views was a benefit to societies and helped government better connect with their people.
The Swedish-based website Bambuser, which streams video from mobile phones, said it had been blocked in Egypt. On its blog, it accused Egyptian officials of trying to control the news agenda.
The BBC's Jon Leyne in Cairo said rallies had been held in several parts of the capital, and the turnout had been more than the organisers could have hoped.
Police were taken aback by the anger of the crowd and let protesters make their way to the parliament building, he says.
There police regrouped in full riot gear with tear gas and water cannon and temporarily drove the crowd back. However, protesters threw stones and stood their ground, pushing the police back until they were on the run.
Protests also broke out in other areas, including the eastern city of Ismailiya and the northern port city of Alexandria.
In Alexandria, witnesses said thousands joined the protests, some chanting: "Revolution, revolution, like a volcano, against Mubarak the coward."
'Nothing to fear'
In Cairo's Tahrir Square, demonstrators attacked a police water cannon vehicle, opening the driver's door and ordering the man out of the vehicle.
Officers beat back protesters with batons as they tried to break the police cordons to join the main demonstration.
Cairo resident Abd-Allah told the BBC that by Tuesday night some protesters were saying they wouldn't give up until President Mubarak had gone.
"People are behaving as if they are ready to die," he said.
"The atmosphere is very tense, it feels like a revolution. I see people who are determined, people who have nothing to lose, people who want a better future."
Reports said protesters had earlier gathered outside the Supreme Court holding large signs that read: "Tunisia is the solution."
Some chants referred to Mr Mubarak's son Gamal, who some analysts believe is being groomed as his father's successor. "Gamal, tell your father Egyptians hate you," they shouted.
The organisers rallied support saying the protest would focus on torture, poverty, corruption and unemployment, calling it "the beginning of the end".
Weeks of unrest in Tunisia eventually toppled President Zine al-Abidine Ben Ali earlier this month.
Egypt has many of the same social and political problems that brought about the unrest in Tunisia - rising food prices, high unemployment and anger at official corruption.
However, the population of Egypt has a much lower level of education than Tunisia. Illiteracy is high and internet penetration is low.
There are deep frustrations in Egyptian society, our Cairo correspondent says, yet Egyptians are almost as disillusioned with the opposition as they are with the government; even the Muslim Brotherhood, the banned Islamist movement, seems rudderless.
While one opposition leader, Mohamed ElBaradei, called on Egyptians to take part in these protests, the Muslim Brotherhood has been more ambivalent.
Our correspondent adds that Egypt is widely seen to have lost power, status and prestige in the three decades of President Mubarak's rule.