CAIRO, Egypt -- Muslim fundamentalists who opened fire on traffic in Cairo Sunday chose a busy street corner for this latest attack, apparently assuming that they could then melt into the crowd.

They were wrong. Instead, bystanders began a dramatic chase, nearly a quarter-mile on foot and by motor scooter, in pursuit of the attackers. They caught two, beat them up and turned them over to police. One man died from his injuries.

It was the latest evidence of a sharp turn in public opinion against the religious militants who have been waging a small terrorist war in Egypt in the name of the people, killing more than 170 people in their campaign.

As the religious radicals seeking to overthrow Egypt's secular government have brought their terrorist activities from the countryside to Cairo, they have rapidly lost any chance for wide support, according to observers.

"The violent groups have alienated the entire spectrum now," said Mohammed el-Sayed Said, a commentator for the Al-Ahram newspaper.

When the fundamentalist groups began attacking policemen in the rural villages of Egypt about 18 months ago, the actions were viewed ambivalently by many in the public, according to Hussein Amin, professor of Islamic Studies at American University in Cairo.

The government's popularity is low. There was little outcry for the figures of authority who were killed by militants evoking the name of Islam in this Muslim country.

"People at first decided to wait and see what happened," Dr. Amin said. "As long as the targets were policemen, they thought it wasn't their fight."

But as the fundamentalists moved their operations to Cairo and bystanders began to die from bombs in public places, "it turned public opinion against the terrorists," he said.

First evidence of the radicals' new tactic came Feb. 26, when a blast shattered a cafe in crowded Tahrir Square, downtown's central point, killing three people and wounding 16.

Since then, other timed bombs have taken a toll. A blast at a Cairo neighborhood bus terminal May 21 wounded five. Another bomb exploded on the Pyramids Road underpass June 8, riddling pedestrians with nails. One died, and 22 people were injured. The public remained transfixed on the battle for life of a young girl with a nail driven into her head by the blast. She eventually emerged from a coma.

On June 18, in a working-class Cairo neighborhood called Shoubra, a bomb killed seven people and wounded more than 20. It also was a particularly horrific device, packed with nails.

Last Sunday, about five gunmen with automatic weapons opened fire in Cairo. The car of a top army official was riddled, although the government denied reports that the army was a target and asserted that the attack had been random. The officer lived, but a 27-year-old bystander and a traffic policeman were killed.

"It's sinful," said a 31-year-old maintenance worker, Atleya Sheikh, who attended the funeral of the victims. "This young person they killed -- why did he die? Why does anyone do this to his own country?"

"People are scared," said a young woman who works in Cairo. "When I took my nieces to the cinema, they asked what would happen if there's a bomb. I worry, too."

Dr. Amin said moderate Muslims were worried that the attacks would dampen the growth of support for the Islamic movement in Egypt.

"They don't care if Islam has a bad name in the West," he said. "But now Islam has started to have a bad name among Muslims. To see a bearded man in the street, or a veiled woman, now makes you think of terrorism."

El Sayed el-Malleh, deputy editor of El-Shab (The People), a newspaper that favors the Islamic movement, said he could not defend the attacks on civilians. But he said the government, which has conducted a harsh crackdown and hanged 15 people after hasty military trials, had its share of blood on its hands.

"We are against attacks either from the government or from young radicals," he said. "The Egyptian people don't like killings by the military courts, either."

It is a common stereotype here -- not entirely born out by history -- that the Egyptian people are too peaceful to embrace such terrorism.

"The attacks are morally serious," Mr. Said argued. "They are shattering our national psyche. Our psyche can hardly accommodate violence."

But the grind of trying to scrape out a living in this poor country creates a well of sympathy for those who lash out at the government, said economist Galal Amin.

"Terrorism is not only a reflection of ideology; it's a reflection of the economy," he said. The high unemployment rate -- estimated by private sources at 20 percent -- "is terribly demoralizing."

"When you are a young graduate, and you have hopes and your family has put their savings for you to go to college, and you discover there is no future, this is the greatest cause for joining terrorists," he said.

Ironically, said Hussein Amin, the attacks by Muslim radicals may boost the popularity of their chief target, secular President Hosni Mubarak.

"It's really a question of the devil and the deep blue sea," he said. "The government is really hated. But now the populace will take part . . . in rounding up these terrorists."