CAIRO - For 11 days, Tahrir Square has been the canvas on which a revolution has unfolded.

At times, it has been an almost utopian scene of Egyptian joy, hope and community. But it has also become an inferno of smoke, strife and death.

As Egyptians vie for control of their country's future, the square has become the central battlefield, with the struggle there playing out for the rest of the world to see.

On Friday, the vast, open space near the banks of the Nile remained in the hands of pro-demo-cracy demonstrators, who have vowed not to leave until President Hosni Mubarak resigns his office.

Unlike so many of the demonstrators who have taken to streets across the Arab world in recent decades, most of those who have occupied Tahrir say they are politically secular - and they appear more disappointed in the United States than anti-American. They have made "cross and crescent together" an informal slogan, reflecting their embrace of Egypt's minority Christian community. They band together to sing patriotic Egyptian songs but hail foreigners warmly and greet them at checkpoints marked by the burned-out hulls of police vehicles with a hearty "Welcome to Egypt."

As the government's tactics for crushing their movement have escalated this week, so has the resolve of the demonstrators.

When they first occupied the square nearly a week ago, those opposing Mubarak chanted, "We are going to stay in the square."

More recently, the line has changed: "We are going to die in the square."

For a government that has brooked little opposition over the course of Mubarak's repressive 30-year rule, the demonstrators' stubborn refusal to leave Cairo's central plaza has been a deep affront. The protesters know that, and they believe that if they stay long enough, Mubarak will be forced to relinquish power.

When the protesters in the square are not being attacked by pro-Mubarak forces wielding rocks, sticks and knives, the atmosphere here is remarkably peaceful.

Men with plastic bags filled with prepackaged food make the rounds, ensuring that everyone has enough to eat. Others meticulously sweep the streets, cleaning up debris from the previous night's battle.

Women lie on blankets covering what was once a manicured patch of green but is now a wasteland of dirt and mud. Doctors tend to the wounded, bandaging fresh gashes and snugly tying slings. At prayer time, the chants against Mubarak abruptly stop, and the faithful get down on hands and knees.

"Revolution is like a love story," said Alaa Al Aswany, the Egyptian novelist whose writings about the hypocrisy of the Egyptian government and the need for free elections have helped inspire the pro-democracy movement. "When you are in love, you become a much better person. And when you are in revolution, you become a much better person."

But the good mood has often been broken in recent days by spasms of merciless violence.

It starts when a roar goes up, signifying that pro-Mubarak forces are surging toward the square. Hundreds of men press forward to one of the square's entrances to push them back. Rocks fly. Women run for cover. Hand-to-hand combat ensues, with frequent gunshots and explosions piercing an otherwise silent city at night.

Out of the scrum, prisoners emerge.

Those in the square say they have captured dozens of men from the pro-Mubarak side who wear civilian clothes but carry police, ruling-party or government identification cards.

Demonstrators have been repeatedly attacked by such men in recent days, with hundreds of people injured and at least nine killed. It would be easy for a mob mentality to take hold.

But the protesters show a measure of empathy for their captives. The identification cards, protesters say, show that their foes come from poor areas of Egypt, and many have confessed to being promised a reward if they try to storm the square - usually about $20 and a meal at Kentucky Fried Chicken.

"They're Egyptian, just like we are," said Khalid Abdul Rahman, a 26-year-old demonstrator. "But someone's telling them that we're not Egyptians."

The detainees are first moved to a travel agency fronting the square that has become a makeshift prison and then passed along to Egyptian soldiers, who impassively watch the scene from atop their tanks.

Rahman said he comes and goes from the square. He said he always returns when he hears that his fellow protesters are under assault, running back with friends and slipping in through the military's checkpoints. But he said he has not yet thrown a single rock.

"When I find that our revolution has become violent, I will leave this square for good," said Rahman, a teacher in jeans and sneakers.

That sentiment is reflected in a popular chant: "We are peaceful."

Yet the lust for revenge is also growing as protesters continue to be hurt and killed.

Days ago, demonstrators called only for Mubarak to leave Egypt and never come back. Lately, they've been demanding that he be tried and executed.

On a chair set up outside the travel agency, demonstrators have mounted an exhibit of brass knuckles, switchblades and bullet casings. A sign on the chair reads, "Mubarak's Museum: These are the weapons of Hosni the Butcher."

Demonstrators have gathered their own weapons.

They have chipped away at the sidewalks, dislodging bits of concrete that they can hurl toward the pro-Mubarak crowd whenever a brawl breaks out. Scraps of metal have become shields, and cardboard boxes are turned into makeshift helmets.

Yasser Sayed's right arm was badly injured in one recent clash. He's a 19-year-old laborer, and he's proud that despite repeated attempts to oust the demonstrators, they have stood their ground.

For the protesters, he said, survival is victory but death would be just as sweet.

"We've had 30 years of injustice, hatred and oppression," Sayed said, his hands flecked with blood. "The people are looking for change. The people have come to die as martyrs."

Special correspondent Samuel Sockol contributed to this report.