In this city of pointed minarets and cavernous prayer halls, the newly opened mosque across from the Ahmed III Fountain is old Istanbul doesn't look like much: just three tiny rooms with paint flaking off the walls onto garish carpets of green, yellow and red.

But for the Turkish Moslems who have been crowding into the mosque for prayers five times a day since it opened earlier this month -- after a 45-year ban on worship there -- it is a sacred and special place.

"It is a priviledge to pray here," said Yussuf Dulger, a mechanic. "It is a very unusual feeling because this is not just any mosque."

Indeed this tiny, unpretentious place of worship is an annex of the famed Hagia Sophia, the grand cathedral of ancient Byzantium, which Sultan Mehmet II, on the day he conquered Constantinople in 1453, converted into the most sacred mosque of his Ottoman Empire.

The resumption of Moslem prayers here is both a result of the vicissitudes of Turkish politics and a symbol of a resurgence of Islam across the Middle East.

For almost 500 years the mosque in the basilica of the Hagia Sophia stood not only as Mehmet's monument to Islam's triumph over Christianity in Turkey but as a symbol of its dominance of Turkish society as well.

It took the reform-minded, and some say atheistic, Kemal Ataturk, the father of modern Turkey, to dismantle Mehmet's vision. In the late 1920s and early 1930s, not only did he abolish the old Ottoman caliphate but he forcibly sought to secularize Turkey. Ataturk, in his drive to construct a republic, banned Moslem prayers in the Haglia Sophia 45 years ago and turned it into a museum.

"In Islam, every place on earth is a place of worship, but where people worship together, as they did the Hagia Sophia, it is a place of sacredness," said Ramazan Pakdil, an Islamic theology student, after the noon prayers here were broadcast to the ancient neighborhood from a small loudspeaker mounted on the minaret next door. "When this sacredness is denied to a place as it has been done here, it cries. The Hagia Sophia has been crying since Ataturk.

As Ataturk reversed Mehmet's vision, his own now has been eroded by the resumption of Moslem prayers within the confines of the Hagia Sophia, if only in the small back annex separated by an iron grill door from the cavernous main basilica. There, infidel tourists roam in shorts and tank tops, talking loudly and popping flashbulbs.

The common wisdom remains that Ataturk's secularization has stuck. And thought the vast majority of Turkey's 45 million people would still consider themselves Moslems, they have grown up under a separation of church and state that Ataturk ordained as the keystone of his plan to build a modern state out of the ruins of the decadent empire he inherited.

But Islam, which constitutes a total way of life, is not so easily limited by the decrees of politicians, not even an Ataturk. "The question is whether 45 years of secularism is really enough to change 500 years of theocracy," said a worried Istanbul professor who boasts of being an atheist.

Although the secularists remain the apparent majority, there are signs that underneath the surface of Turkish society boil strong religious forces.

In the past several elections, the religious National Salvation Party of Nekmettin Erbakan has received about 10 percent of the popular vote. More important, neither Premier Sulleyman Demirel's Justice Party nor Bulent Ecevit's opposition Republican People's Party has been able to gain a majority in the past decade. Hence the only possible government has been one formed in coalition with Erbakan, an erratic, even fanatical man.

Given the history of Ataturk, and the fact that Turkish Moslems are mostly Sunnis and not the more militant Shiites, few here foresee an Islamic revolution of the sort that violently overturned the shah of Iran -- himself an admirer of Ataturk. But in an age when the prestige and power of Islam are at a height unreached since 16th century, Islam can mean votes.

Premier Demirel, as astute and pragmatic a politician as exists in Turkey, has been quick to spot that. He has increasingly showered favors on the religious forces in the hope of drawing some of Erbakan's votes to his own party.

Demirel has raised the prospect of Islamic religious teaching in schools, while not moving particularly fast in that direction. His decision to reopen the Hagia Sophia was a similiar gesture -- limited, however, in that he only turned a small annex over to the Moslems while the main bastilica remains a museum for tourists.

Admirers of Demirel view all these moves as smart politics, especially given the fact that elections must be held within the next nine months. His detractors, however, worry that his repeated, if so far limited, concessions to the Moslem vote may be fanning the forces that Ataturk tried so hard to bury.

A sermon read by Iman Omer Aycan in the mosque the other day indicates why many Turks are uneasy about the political sops being offered the Islamic church.

Three hundred worshipers jammed into the three tiny rooms of the mosque. Women were turned away because of the "lack of space." Iman Aycan spoke of the "plots of the enemies of Islam" who sought to deprive it of its force and legitimate place as a guide of society. He derided the "charlatans who advocate ideologies under the mask of civilization while they try to sow the seeds of discord against Islam."

"Independence and sovereignty of a nation depend on the faith of the nation," he intoned from the small wooden pulpit. "If the nation strays away from the faith, it will speed towards doomsday."

"This is only a small step," said a carpenter. "We will not rest till we have the whole Haghia Sophia to say our prayers in. An arm should not be separated from its body. It is only our divisions that have kept us from taking over again. When we unite we will again triumph."