Demonstrators have taken to the streets of several Egyptian cities to protest against the prospect of a fifth term in office for President Hosni Mubarak.
Cairo demonstrators were prevented from reaching parliament
Hundreds of protesters were prevented from reaching the parliament building in Cairo by thousands of riot police.
A similar demonstration in Alexandria was called off after security forces sealed off all routes to the site.
Cairo's security chief has warned that police will no longer tolerate rallies by the Kifaya ("Enough") group.
"If we are getting to the stage of getting used to violating [the rules], then the principle is that legal regulations must be implemented," Nabil Ezzabi said in an interview on Tuesday.
Street demonstrations are officially banned in Egypt by emergency laws enacted after President Anwar Sadat's assassination in 1981.
Kifaya activitists have staged a series of rallies in the past four months calling for constitutional reform and demanding that neither Mr Mubarak - who has ruled for 24 years - nor his son Gamal should stand in September elections.
Gen Ezzabi was waiting for the Kifaya protesters on Wednesday as dozens of them headed towards the parliament building for a rally.
"I am the director of security, I order you to disperse in five minutes or else I'll take measures against you," he threatened.
Layers of riot police were deployed around the parliament building in tight formations behind metal barriers.
Demonstrators then headed towards the headquarters of the journalists' union in the centre of Cairo.
A counter protest was staged in the centre of Alexandria
"The one who strikes the Egyptian people is not fit to rule Egypt," protesters chanted as they walked 2km (one mile) to the new location.
"The one who bars demonstrators should face the fate of Sadat," another chant went.
George Ishak, a Kifaya leader, said the large deployment of security personnel had turned Cairo into "a military zone".
Witnesses in Alexandria said the police later allowed a pro-Mubarak rally to take place where they had prevented the opposition from gathering.
Police said 20 people were detained in Alexandria and another two were held at a rally in the Nile Delta town of Mansoura. There were no arrests reported in Cairo.
Marchers in Mansoura claimed to have been set upon by pro-Mubarak thugs, although this has not been confirmed by police.