On the birthday of the Prophet Mohammed, celebrated by Moslems all over the world, President Anwar Sadat came to Friday devotions at the simple little mosque of this mud-brick village.

To the sound of tambourines, young men shouted their approval and women emitted their long, ululating shrieks of happiness as Sadat arrived in a Volkswagen, waved to them all and entered the mosque.

It was another of the president's masterful exercises of combining prayer and politics. More than any other Arab leader, except possibly Muammar Qaddafi of Libya, Sadat works at being a man of the people who remembers his humble origins with pride. He regularly joins his countrymen in pressing his head to the floor at prayer in Friday services.

The president's arrival was a major event in this village near Ismailia. The residents stood for hours in a cold rain, waving banners and applauding, to see him. The entire event illustrated neatly how Sadat has avoided the political mistakes that brought down his friend and ally, the shah of Iran.

Where the shah was aloof, Sadat is gregarious. Where the shah was grandiose, Sadat is simple. Where the shah alienated the religious leaders of Iran, Sadat cultivates those of Egypt, consulting them, flattering them, praying with them.

Cairo newspapers this morning carried front-page photographs of Sadat receiving the new grand sheik of Al Azhar University, Mohammed Bissar, whose position makes him one of the most influential men in Islam. Sadat recently appointed him, and now the president can expect his cooperation.

Before their meeting, Sadat's vice president, Hosni Mobarak, joined the grand sheik in prayers and a march organized by thousands of sufis, or Moslem mystics.

As he does for a time every year, Sadat has taken up residence in Ismailia, on the Suez Canal. From there, he is touring the surrounding provinces, promoting agricultural developments, urging farmers and workers to produce more, encouraging local officials and meeting the people.

Abu Atwa, a few miles south of Ismailia, was honored as the village where Sadat would perform his devotions on the prophet's birthday because the people of Abu Atwa are said to have fought alongside the army in repulsing a thrust by some Israeli tanks during the 1973 war. Four captured tanks are on display at a little museum outside the village.

Unlike the shah, who spent billions of arms but fought nobody except a handful of Communist insurgents in Oman, Sadat always reminds the Egyptians that they fought successfully against Israel even though the Soviet Union had failed to come through with the weapons Egypt needed.

Sadat rode from Ismailia to Abu Atwa in a caravan that took him past thousands of cheering Egyptians lining the muddy, reeking streets to welcome him. Black-robed women clutching their babies peered out from their primitive houses and waved and smiled as he went by.

When he arrived at the mosque, wearing a turtleneck sweater and a casual suit, he stepped out and raised his arms in greeting as the villagers cheered. Sadat appeared to be enjoying himself as he shook hands with local dignitaries and doffed his shoes to enter the mosque.

Just at that moment, a brick retaining wall atop a house next to the mosque gave way and a little boy fell to the ground in the rubble. The president immediately sent out members of his staff to inquire and assist. As it turned out, the boy was not hurt, but it took only a few minutes for the story of the president's gesture to spread.

Inside the mosque, the president sat on the floor, as he always does, indistinguishable from the other worshippers except that he was being filmed by television cameras.

When he departed an hour later, to new cheers, the rain had stopped and he rode standing in an open jeep, waving and smiling.

It is a scene that Sadat has played innumerable times in mosques all over Egypt. The Volkswagen and the jeep are recently added touches -- the president has abolished the Mercedes as an official car -- but the message to the Egyptian's people never varies.

His visit to Abu Atwa did not bring electricity or running water to the houses or teach the illiterate citizens how to read, but it did leave the impression that the ever-hopeful villagers support him anyway.

Among the educated classes in Cairo and Alexandria, and among some urban factory hands, there is deep cynicism about Sadat's populist performances. But they appear to be effective among the vast majority of Egyptians, who went quietly about their business even during the food-price riots that challenged Sadat's rule two years ago.