Riot police walk in front of graffiti depicting Bassem Mohsen, 20, who was killed in the 2011 Egypt uprising, along Mohamed Mahmoud street during the third anniversary of violent and deadly clashes near Tahrir Square in Cairo November 19, 2014. REUTERS/Amr Abdallah Dalsh

The rally was a rare sign of defiance against strict protest laws imposed by the government of President Abdel Fattah al-Sisi, the former army chief who has also allowed military courts to try civilians in a crackdown that began with Islamist supporters of ousted President Mohamed Mursi.

Activists had planned a march in streets near Tahrir Square on the anniversary of the deaths of 42 people three years ago when Egyptians demonstrated against the government that took power following an uprising that toppled autocrat Hosni Mubarak.

A security source said the detainees would be released “soon”, but a decree passed last month means they could be tried in military courts for blocking the road.

In Alexandria, four people were arrested, including leading activist Mahienour el-Massry, according to the “Free Mahienour” Facebook page. The page said those detained were not protesting. It gave no more details on the arrests.

Authorities in Egypt’s second biggest city were not available to comment.

Massry was sentenced to two years in prison last year for protesting outside a court trying two policemen accused of killing a man whose death in 2010 helped to ignite the uprising against Mubarak.

She was released in September following an international outcry against her sentence.