Saudi Arbia announced today that Syria has agreed to withdraw its troops gradually from the border with Jordan, apparently ending a crisis that had raised fears of another Middle East war.

Prince Abdullah, second deputy prime minister and commander of the Saudi National Guard who had mediated between the quarreling. Arab neighbors, told the official Saudi News Agency that his mission was "successful" and that President Hafez Assad of Syria promised to pull back from the tense 180-mile border.

Crown Prince Hassan of Jordan said, however, that the Syrian forces have not yet withdrawn and that King Hussein's government would consider the danger over only after the Syrian troop buildup is reversed and the border area returns to normal.

"There is no evidence of a military withdrawal; there is evidence of troop movements, which could be tantamount to a redeployment," Hassan said in an interview. "There is no indication that the situation has changed on the ground . . . . Until and unless every Syrian soldier withdraws from our border, we cannot let down our guard."

But the Syrian information minister, Ahmed Iskander, indicated to reporters in Damascus that Syria considers the crisis on its way to resolution, saying:

"We are convinced now that the Jordanian regime will seriously take into consideration what Syria wants. This could be what we sought to achieve."

It was not clear whether this meant Assad had dropped his demands for formal pleges from Hussein that Jordan would not try to speak for the Palestinian people in the place of the Palestine Liberation Organizations and that the Moslem Brotherhood would not be able to use Jordan as a haven in its fight against the Assad government. Hussein rejected these demands yesterday, with his spokesmen saying neither was necessary because Jordan is not harboring Brotherhood guerrillas or seeking to supplant the PLO as standard-bearer for the Palestinians.

Against this background, Hassan said that Jordan was not involved in a mediation effort with Syria because there is nothing to mediate. Hussein sent a message to this effect to King Khalid of Saudi through Abdullah, Hassan added.

"We made it clear that we do not feel there is any issue of differences between us and the Syrians," he said.

Abdullah tried to cool off the tense situation following the Syrian troop buildup over the last two weeks, which brought the number of Syrian soldiers in the border area to at least 50,000 by Jordanian count. In response, Hussein also increased his forces along the border to about 30,000, according to foreign estimates.

Senior Jordanian officials indicated privately that they thought the Syrian troop movements were partly a result of a Soviet desire to use Syria as a diversionary instrument to raise "the degree of nervousness" in the Middle East to a point that Westen concern would allow compromises on various global issues such as Afghanistan or strategic arms limitation talks.

The Jordanians also see the Syrian moves as stemming largely from domestic troubles facing Assad, who has been fighting a year-old rebelliion centered on the outlawed Moslem Brotherhood organization. Syria has repeatedly accused Jordan of supporting the Moslem Brothers, an accusation Jordan has vehemently denied.

The senior Jordanian officals added that they also thought Syria felt it might be forgotten in any comprehensive Middle East peace negotiations that might come in the wake of the inauguration of President-elect Ronald Reagan, and therefore used the challenge to Jordan to reassert its presence and role in the area. Iskander's comments in Damascus seemed to confirm this version of the Syrian motives.

"If that was the aim, it would seem more logical for Syria to mass troops along the Israeli border, instead of along the Jordanian border," the Jordanian officials said.