Jordan's King Hussein ended a two-day visit here today during which he held two rounds of private talks with Syrian President Hafez Assad on the Middle East situation and ways of improving bilateral ties.

No joint communique was issued after the talks, and Syrian and Jordanian officials declined to comment on the discussions beyond saying that they had concentrated on "all regional developments, joint Arab action and ways of developing bilateral relations."

Ties have been strained severely during the past six years but have been improved since September, when the two countries began to draw closer. Reports that the two leaders had agreed to exchange ambassadors soon were taken as an indication that improvement continued.

Officials declined to comment on a report to that effect, however, carried by Reuter news agency, citing unnamed Jordanian sources. Relations were downgraded from ambassadorial level to that of charge d'affaires following a military buildup on the Syrian-Jordanian border in 1982.

Hussein's visit to Damascus, the first in six years, was preceded by four meetings between Jordanian Prime Minister Zaid Rifai and his Syrian counterpart Abdul Rauf Qasim, first under Saudi auspices in Jeddah and Riyadh, then in Damascus and Amman.

The two prime ministers established agreement on several broad political issues, thus creating an acceptable groundwork for Assad and Hussein to build on.

So far, the two countries have agreed to reject direct or separate peace talks with Israel in favor of a U.N.-sponsored international peace conference.

In an apparent compromise, Syria abandoned last month its formula for an international conference in favor of the Jordanian concept, while Jordan has voiced implicit support for Syrian efforts to end the civil strife in Lebanon. The need for stability in Lebanon was stressed in the most recent Syrian-Jordanian communique, issued simultaneously in Amman and Damascus after Rifai visited the Syrian capital in mid-November.

Jordan calls for the participation of the five permanent U.N. Security Council members -- the United States, Britain, the Soviet Union, France and China -- in the international conference alongside the parties to the Middle East conflict, whereas the Syrians previously had sought to exclude Britain, France and China.

However, several basic issues still divide pro-West Jordan and its northern, Soviet-armed neighbor.

According to Jordanian officials and leaders of the mainstream Palestine Liberation Organization, King Hussein remains committed to his February 1985 agreement with PLO Chairman Yasser Arafat on a joint approach to Middle East peace, while Assad is strongly opposed to Arafat and supportive of Syrian-backed PLO rebels seeking Arafat's overthrow.

Syria supports Iran in the five-year-old Persian Gulf war, while Jordan suports Iraq.

Hussein is pursuing close political coordination with Egyptian President Hosni Mubarak, while Syria remains in favor of keeping Egypt isolated from the rest of the Arab world because of its separate peace treaty with Israel, Jordanian officials say.

It remained unclear to what extent Hussein and Assad had managed to make headway on those issues dividing them, but their warm farewell at Damascus Airport indicated a positive atmosphere.

Jordanian officials have stressed repeatedly that complete agreement on all foreign policy issues is not a condition for improved relations with Syria.

But western diplomats in both Damascus and Amman believe that Jordan is using its improved relations with Syria as a pressure tactic to induce Arafat to make the necessary concessions that could make him an acceptable interlocutor to Washington and allow him to participate in an international peace conference.

Jordan's main demand is that Arafat endorse U.N. Security Council Resolution 242, which calls for the right of all states in the region, including Israel, to exist within secure boundaries.