Naif Mohammed Khalidi stood at a distance in his white Kuwaiti robes and watched as a black ram was slaughtered on the sidewalk of a main street in the affluent neighborhood of Zamalek. Blood poured into the gutter around the tires of a Mercedes-Benz.

Today, Khalidi explained, "any man who has money buys a sheep." A third of the sacrificed animal is given to the poor, he said, a third goes to friends and a third is kept for family.

But Khalidi, a shipping executive, had come to Egypt alone from Kuwait for vacation. "I have no family and no friends in Cairo," he said. "So I give all this to the poor."

Today was the beginning of The Big Feast (Eid al Kabir), which also is known as the Feast of the Sacrifice (Eid al Adha). Bustling Cairo and most of the rest of the Moslem world came to a stop for a celebration that exemplifies the generosity of Islam even as it horrifies some unprepared western visitors.

The occasion is the climax of the hajj, or holy pilgrimage to Mecca, that every Moslem is expected to undertake once in his life. Wealthier Arab families sacrifice sheep, bullocks or camels. In Saudi Arabia, the ritual is performed en masse by hundreds of thousands of pilgrims after their visit to Mecca's Kaaba shrine and Mount Arafat.

The act commemorates the moment when Abraham was about to sacrifice his son in obedience to God's command, only to have God intercede at the last moment and substitute a ram to be slaughtered instead.

In rich Cairo neighborhoods, hundreds, even thousands of sheep may be slaughtered. To kill one or more rams, or larger animals, is partly a sign of status.

Last night, on a busy shopping street in Zamalek, the owner of a car dealership had a bullock weighing several hundred pounds decapitated and butchered on a corner near his storefront. He wanted to make sure his doormen, car washers and friends got the meat they deserved, said one of his employes, even though he would be traveling today.

If the father of a family does not perform the sacrifice himself, but delegates it to the many butchers roaming the streets this morning with bags full of long knives, he should witness the killing. Children watch in fascination.

"They've been doing this in front of me since I could walk. So I'm used to it," said a cosmopolitan, western-educated young Egyptian woman. "But I'm afraid some people who aren't used to it think it's a little barbaric."

In Saudi Arabia in years past, pilgrims slaughtered such enormous quantities of sheep that much of the meat had to be burned to prevent epidemics. But now the Saudis and some other wealthy Arab countries have worked out a voucher system so that the animals are killed by proxy and the meat distributed to Moslem countries where there are more poor people in greater need.

In Egypt, as Khalidi said while his ram was carved up this morning, "there are plenty of poor people." Even before it could all be divided into two-pound pieces and put in plastic bags, women in the traditional black dresses of Egyptian peasants arrived with little shopping bags to ask their share.

Egypt's 90 percent Moslem majority is conspicuously devout -- especially its poor. Each call to prayer at any time of year is attended by quantities of the faithful, not only in mosques but on mats laid out in the streets.

Today there is a special sense of celebration. The sacrifice and the feasting, in rich areas and poor, are a family occasion.

Fakri, a taxi driver, said, "It's like your Christmas. Everything is closed. We get shish kebab all day." Normally, he said, few could afford mutton or lamb at the usual $2.25 per pound.

The religious devotion of a vast, frustrated majority is also seen to be one of this country's -- and the region's -- greatest potential political forces.

Each year there are concerns that the hajj will become the scene of radical fundamentalist actions. Most of the time, as this year, there is no problem. But memories remain of a bloody armed confrontation in 1979 at the Grand Mosque in Mecca.

This week, more than 150,000 Iranians were reported to be on the pilgrimage. The second-largest group from outside Saudi Arabia was more than 130,000 Egyptians.

For several months Egyptian President Hosni Mubarak, whose predecessor Anwar Sadat was assassinated by religious extremists, has been locked in a serious confrontation with Moslem fundamentalists here.

In June, fundamentalist leaders were barred from staging protests marches. In July, several were arrested.

Meanwhile, the level of tension in the capital has been raised by the assassination last week of an Israeli diplomat by a mysterious group. The act appeared to have religious overtones. Today, when Mubarak went to pray at the Hossein Mosque at dawn, the area was closed to automobile traffic for miles around by thousands of policemen and soldiers.

At the inner security perimeter, several hundred yards from the mosque, white-uniformed policemen were stationed at intervals of six feet. Closer to the president, combat units in full battle dress were visible, at least one of them with a jeep-mounted machine gun.

When the president's prayers were over and he had departed, the only men nearby in civilian clothes piled into the vans of the security police to leave.

It has been a long, hot summer in several senses, and the holiday traditionally marks an end to the heat. The temperature today reached about 100, but vacationers like Khalidi from the Persian Gulf fill the hotels. Compared to their home, they say, Cairo is cool. At night the temperature drops and horse-drawn carriages carry Saudis and Kuwaitis on the corniches along the Nile.

Politically, however, there are few signs that the temperature will be dropping.

Sheik Hafez Salama, the most conspicuous Egyptian fundamentalist leader at the moment, was released from jail to go on the hajj this year.

Some Western analysts speculate that Salama may not be allowed back. But his lawyer said yesterday that he expected no such problem. When Salama returns, the lawyer said, his agitation for the rule of Islamic law in Egypt will begin again.