Live updates from Egypt >> 
(Alexandria) - For much of Friday afternoon, this city teetered between hope and fear. We knew the army would come - the question was when. About 7:30 p.m., six armored personnel carriers with mounted machine guns arrived at the main square. Then something extraordinary happened: The soldiers were surrounded by hundreds of people - and after several minutes, welcomed. As I write this, ordinary citizens are walking up to the two vehicles stationed at Ramleh Square, and photographing each other flashing victory signs. The mood, tense for so much of the day, is turning festive.
When my interpreter and I arrived in Alexandria this morning, tension already hung in the air. Overnight, many activists, lawyers and members of the Muslim Brotherhood had been detained. But the only visible sign of the anti-government protests that had roiled Egypt in recent days was the heavy security presence: truck after truck of riot police roamed the streets.
We headed to a mosque in eastern Alexandria to observe the Friday midday prayer, the week's main prayer. The imam gave a relatively neutral sermon, speaking about one's duty to God. During the service, three big trucks and an armored car full of riot police parked next to the mosque.
When the prayer ended, as people streamed out of the mosque, many unfurled banners and began shouting slogans: "The people want to end the regime." "Raise your slogans, raise them high, he who shouts will never die." "Gamal, tell your father that all the Egyptian people hate you." "Down with Hosni Mubarak." Most, however, raised their hands in the air and yelled again and again, "We are peaceful." Expecting trouble, we headed to the roof of an adjoining apartment building.
Almost immediately, the armored police van started shooting tear gas directly at the crowd, engulfing them in acrid smoke. Our eyes burned as we watched. Police viciously attacked the protesters, even though the overwhelming majority had clearly expressed the desire to rally peacefully.
For the next two hours, the streets below us became a struggle between the police and the protesters. Both sides threw rocks. The police never managed to advance a block, even as they fired shot after shot of rubber bullets and sprayed tear gas. Some of the protesters set tires on fire. Even families in apartments around the area threw water bottles out their windows at the police, outraged at the brutality with which they had attacked.
Remarkable scenes unfolded in front of us. Repeatedly, groups of unarmed protesters raised their hands and approached riot police officers, only to be met with rubber bullets and tear gas.
Then the tide suddenly turned: A massive crowd, easily thousands of protesters, came down a second road. The police now faced two fronts and a rain of rocks.
And then the police ran out of bullets and tear gas. They began to beg over the sound system of an armored car, saying, "Stop, young men, let it be finished" and "we'll end it now." But the crowd didn't want to give up.
The tear gas canisters the police had fired were turned back against them, and the wind carried it around. Soon we were all retching, overwhelmed by thick clouds of tear gas.
When we regained our senses, a remarkable scene lay before us. The protesters had won. The police had given up, and protesters were now bringing the officers water and vinegar to deal with the tear gas. People were embracing, protesters and police.
Then the ordinary people who had watched the battle from their windows came down and joined the crowd. Suddenly people were everywhere. Time seemed frozen, and people walked around in a daze, not daring to believe that they had triumphed over the feared security forces.
The police simply left. Crowds of people began walking, quickly filling the massive road along the Mediterranean Sea. We joined them, eager to see what would happen next.
Every few minutes, we were met by new crowds, exhausted but victorious in other battles with the police. So many protesters had rallied on Friday that the massive security forces were eventually swamped. The crowds fought with their bodies and stones until the police ran out of steam and gave up.
As we walked home with the sun setting, evidence of even more violent confrontations could be seen: Fires were everywhere. In front of the city's main mosque, a row of police trucks burned. The office of the governorate and a ruling-party building were set on fire, as were many police stations and vehicles. Rumors about protesters having been killed abounded.
Egyptians in Alexandria did the unimaginable on Friday, fending off a police attack for the first time in their lives. They are walking around in shock, unable to digest the significance of what they have done. A few hours ago, everyone was saying: Now, the army will come. But it is no longer clear on whose side the army will intervene. Tomorrow is the first day of a new Egypt.
The writer directs the global emergencies program at Human Rights Watch.