CAIRO
— MODERATION is gaining ground in the Arab world. Arab regimes, exhausted by wars and pressed by economic crises, are turning from ideology to pragmatism in domestic politics and regional relations. This shift is producing a reconciliation not witnessed in the region since before the 1973 Arab-Israeli war. The most recent evidence of reconciliation was last month's announcement that relations between Egypt and Syria had been restored, shattering the rejectionist Arab alliance against peace moves with Israel.

The pervasive changes taking place in the Arab Mideast are symbolized by two events of last April.

In Jordan, the worst rioting in more than two decades dramatized the pressures for political and economic liberalization that have forced leaders of several Arab regimes to turn their attention to domestic problems. Meanwhile, in Casablanca, Morocco, Egypt was formally welcomed back into the 22-member Arab league, signaling the end of a decade of isolation spurred by its 1979 peace treaty with Israel.

Islamic fundamentalism, still on the rise in the Middle East, could undermine these fledgling expressions of liberalization and modernization, Arab analysts say. But as 1990 begins, says a Western diplomat here, ``the Middle East is a more comfortable place for moderation to be.''

The words needed to describe the region today, adds a European diplomat, are ``pragmatism, realism, and d'etente.''

The Mideast once could be viewed in the simple framework of East-West tensions and competition between radical and moderate regimes. But several observers say the region has become far more difficult to analyze because of shifting alliances and the domestic transitions throughout the region.

They say that during the war years of the 1960s and the oil boom of the '70s, Arab governments had the luxury of ignoring a brewing economic crisis created by spiraling birthrates, underdevelopment, and mounting foreign debts. In the 1980s, the full weight of the crisis has hit, producing stagnation, high unemployment, and levels of despair that represent ticking time bombs for regimes throughout the Mideast.

But as political pressures are mounting, these analysts say, the basis of political legitimacy in the region is also changing. Authoritarian regimes from Algeria to Iraq have in the past gained legitimacy on the basis of appeals to socialism, anticolonialism, and Arab unity. But the test has become the ability to respond to concrete social needs.

``Food on the shelves: That's the way to gain legitimacy now,'' says the European diplomat. ``The problem is no longer Arabs versus the West, but regimes against their own people,'' adds the diplomat, referring to circumstances that forced Arab leaders to turn their attention to domestic matters.

Following rioting in Jordan last April, King Hussein instituted modest reforms calling for parliamentary elections and loosening restrictions on the press. In other countries - including Algeria, Tunisia, and even Iraq - the groundwork is being laid for the transition from single-party dominance to greater political pluralism.

Observers here say political changes have been instituted grudgingly by leaders who don't intend to jeopardize their hold on power. But they add that the reforms, such as the Jordanian elections, could fuel pressures for greater liberalization in the region.

Meanwhile, in even the most radical regimes like Libya, leaders have responded to economic shortages by instituting a kind of patchwork capitalism: dismantling trade barriers, creating incentives to private investment, privatizing state-run companies, and allowing the market to set prices.

Less ideological domestic policies have been coupled with more moderate foreign policy, reflecting the exhaustion produced by the Gulf war and decades of quarreling among Mideast states.

Egypt's return to the Arab fold this year was prepared during the Iran-Iraq war, when Cairo was seen by the Gulf states as a military and moral counterweight to the militant fundamentalism of Iran. At the same time, Egypt's decision to recognize Israel 10 years ago was vindicated throughout the Arab world when the Palestine Liberation Organization also agreed in 1988 to recognize the Jewish state.

Once again in a position of influence, Egypt is trying to resolve regional conflicts and press for moderation, while all across the region self-interest is replacing ideology as the basis for bilateral relations.

Eager to end years of diplomatic isolation, for example, Libya's Muammar Qaddafi has warmed to Egypt, just as Egypt is seeking a new outlet for thousands of Egyptian workers returning from Iraq.

Meanwhile, Egypt and Syria are finding common ground in their approach to the civil war in Lebanon and their opposition to Christian leader Michael Aoun, backed by Iraq. After an exchange of high-level officials, Egypt and Syria announced in December that relations between the two nations had been restored. There are plans for a summit meeting between Presidents Hosni Mubarak and Hafiz al-Assad in January. Analysts say rapid domestic and diplomatic changes taking place in the region have been influenced by recent events in Eastern Europe.

One factor in domestic changes has been the collapse of communist regimes in Central Europe, where authoritarian, one-party regimes and socialist economics have been a point of reference since the Arab states first gained independence.

``The dream of intellectuals and military groups who came to power in the Middle East has been to imitate the system in the Soviet bloc, using it for their social existence and justification,'' comments the Egyptian official. ``Now everyone will be talking about liberalization everywhere.''

Meanwhile, the end of the cold war in Europe seems likely to diminish the prospect of hot wars in Mideast.

Finally, the lesson drawn from recent events in Eastern Europe has not been lost on Arab leaders: Reforms should be made before power is lost. ``The Middle East will not be left behind,'' says Egyptian presidential adviser Usama El Baz, speaking about the liberalizing trends in Europe.

But here, the reform impulse is precarious. Analysts say that in the wake of the changes in the Soviet bloc, crucial Western aid needed to sustain a period of incipient political and economic reform in the Mideast could be diverted to Eastern Europe. And Muslim fundamentalists could be the first to profit from the political uncertainty and economic crisis that characterize this period of political transition.

``Fundamentalism is an expression of things being out of control,'' says left-wing Egyptian intellectual Sayed Ahmed, referring to the manner in which political change has also helped to nourish the forces of political reaction in the region.

``The Islamic tide is still rising,'' adds the European diplomat. ``It's the main challenge to all the regimes.''

Threatened by the rise of militant fundamentalism, Arab governments could respond with blunt military force, thus jeopardizing the fragile process of political reform.

``Between them [the fundamentalists] and power, there is only the Army,'' the European diplomat says.