Jordon took a middle course today in the widening rift between Egypt and the more militant Arab countries, saying, in effect, that it will attend neither the preparatory peace talks in Cairo nor the anti-Egyptian summit meeting in Libya.

King Hussein, in his first public statement since Egyptian President Anwar Sadat went to Israel, said that while the mission indicated "great courage" on the part of Sadat, it had caused a dangerous split in the Arab world. He called on Arab leaders to "close ranks and prevent a destructive division.

Disarray and confusion spread in the Arab world, however,as Egypt began preparations for the preliminary peace talks with Israel that are expected to begin next week and militant Arab leaders planned conferences to counter the Egyptian initiative.

President Hafez Assad of Syria initiative, offering in a dramatic move that underscored his seriousness, to end his country's long and bitter feud with Iraq in order that a stronger front could be formed against Sadat.

Most of the Arab opponents of Sadat, apparently including the Palestine Liberation Organization, plan to meet in Tripoli, Libya, Thursday to chart a policy to counter Sadat's and Assad said he would personally attend. Iraq added a note of confusion today by announcing that it, too, was inviting leaders of militant Arab counties to a summit meeting next week in Baghdad.

The Jordanian decision was announced in a government statement and was alluded to only indirectly be Hussein in a televised address later.

Jordan said it was ready to accept the invitations of both Egypt and Libya to attend the rival conferences but it would go to either only on the condition that all the Arab parties concerned attended both conferences something that no one expects to happen.

Sadat had invited all the Arab confrontation states, Israel, the United States and the Soviet Union to talks in Cairo to prepare for a resumption of the Geneva peace conference.

The Jordaman decision means that Sadat's Cairo conference will probably be little more than an Egyptian-Israeli dialogue also attended by the United States.

Jordanian officials described Jordan's action as preserving a "positive neutrality" in the hopes that Jordan might serve as a mediator to bring Syria and Egypt back into a common alliance.

Hussein's speech stressed the compelling need for Arab unity. He said that the Sadat initiative had taken Jordan by surprise and at a time when Jordan was doing its best to promote Arab unity.

The King said that the individual action taken by Sadat had caused a dangerous rift in the Arab world which he described as a "crisis."

But he added that he could understand Sadat's motives for wanting to "cut across" the traditional modes of diplomacy, saying Sadat's initiative had destroyed Israel's refusal to consider the Arab point of view for a lasting peace. Sadat's trip to Jerusalem should not cause a "complete break" in the Arab cause, Hussein said.

Diplomats here were not suprised that Jordan had chosen a middle course between Syria and Egypt on this matter and they expressed admiration for King Hussein's agility in avoiding having to take sides.

Washington Post correspondent Thomas W. Lippman reported from Cairo:

President Assad of Syria renewed his attack on the Egyptian initiative, telling reporters in Damascus that he woud personally attend the anti-Egyptian summit conference in Libya to "discuss ways and means to foil the results of Sadat's Israel trip."

Assad also said he hoped to patch things up with the Baghdad regime because "we are all facing the same dangers."

Syria and Iraq, ruled by rival wings of the Arab Baath Socialist Party, have been at sword's point for years because of ideological disputes and quarrels over the water of the Euphrates River.

His gesture to Iraq followed a mediation mission by Algeria, which is also opposed to the SADAT initiative and is expected to attend the Libya conference. Algeria has been trying to persuade Syria and Iraq to put aside their differences so they could join Libya, Algeria, South Yemen and the PLO in a campaingn against Egypt.

As Egypt began preparations for the talks with Israel, goverment officials in Cairo said the probably site of the conference would be the Mena House Oberci Hotel, a venerable but pleasant hostelry at the foot of the Great Pyramid of Cheops on the outskits of the city. It was the setting for the 1943 Cairo conference between Franklin D. Roosevelt, Winston Churchill and Chiang Kai-shek.

The preparations are being made in the absence of any firm information about how many countries are going to attend. At the moment the only certain participants are Egypt, Israel, and the United States.

Yesser Arafat and other spokesmen for the Palestine iberation Organisation have said that the PLO would not come to Cairo but instead would join the rejectionists in Tripoli.

This attitude has surprised experienced analysts of Palestinian affairs here because in their view the PLO could only gain politically be agreeing to come to Cairo.

Israel has always refused to negotiate with PLO under any circumstances. If the PLO sent a delegate to the Cairo conference, it would either force the Israelis to back out, putting the blame for sabotaging Sadat's peace initative on Israel, or force the Israelis to give the PLO de facto recognition.

But the PLO is at the mercy of the Syrians, who provide them with arms and have them under military control in Lebanon, and of the Iraqis and Libyans who provide financial support. If these nations really wanted to derail Sadat's peace campaign, observers here say, they might best do it by encouraging the PLO to come here and challenge Israel to accept it, but there is no sign they are prepared to do that.