Syrian President Hafez Assad gave Secretary of State George P. Shultz a highly negative reaction today to the Israeli-Lebanese peace agreement, leaving strong doubts about obtaining Syria's crucial acquiescence to the settlement.

Shultz spent four hours today in talks with Assad, whose agreement to pull out Syrian troops stationed in Lebanon must be obtained for the Israeli-Lebanese peace accord to be implemented. Israel has made it clear it will not remove its troops from Lebanon unless there is a simultaneous pullout by Syrian and Palestine Liberation Organization troops in that country.

In apparent anticipation of the Syrian response, Israeli Foreign Minister Yitzhak Shamir told Israeli radio in Tel Aviv that if Syria refuses to withdraw its troops under the accord Israel may retrench in secure positions in southern Lebanon.

After talking with Assad, Shultz told reporters, "I think it's fair to say that they the Syrians are hardly enthusiastic about the agreement that Lebanon and Israel have worked out." He said that Assad left the door open for further discussions with U.S. representatives and that he did not give up hope that Syria's problems with the accord could ultimately be resolved.

"My guess is that these will be very difficult negotiations," Shultz said. "I cannot predict how long that will take, but it will take a little while," he said. He said that neither he nor special U.S. Middle East envoy Philip Habib had any "direct plan" for returning here.

The talks here marked the latest turn in the two-week personal diplomacy that Shultz has been conducting in the Middle East. Shultz came here seeking to maintain the momentum the peace effort generated by the Israeli Cabinet's acceptance yesterday of the tentative peace accord. Later in the day, he flew to Jeddah, Saudi Arabia, for talks with King Fahd.

The official Syrian news agency quoted Assad as criticizing the tentative agreement because it allows Israel to retain an unacceptable military presence in Lebanon, United Press International reported.

"Nothing can justify Israeli gains in Lebanon," Assad said. "The truth is, when Israel sets preconditions prior to pulling out its troops from Lebanon it clearly indicates that Israel wants to impose its hegemony over all of Lebanon."

Damascus Radio called the draft Israeli-Lebanese agreement "a victory first for Israel, second for the United States and very last for Lebanon, because it gives Israel military, political, economic and security gains. This American effort will not be welcomed or accepted in the Arab world."

The radio commentary this afternoon marked the first time the news media here have mentioned Shultz' visit.

Shultz was reluctant to describe in detail the objections to the peace agreement raised in his meeting with Assad and earlier sessions today with Foreign Minister Abdul Halim Khaddam.

Syria, which has been rebuilding its armed forces with heavy Soviet systems, has voiced strong suspicion about Israeli and American intentions in Lebanon and had warned repeatedly throughout the past week that it would accept no agreement that gives Israel "gains" or threatens Syria's security.

It was on the issue of security that Shultz pinned hopes for ultimately working out Syria's problems. "I think we have started always with the proposition that what the agreement yields is complete Israeli withdrawal" from Lebanon, he said. "And from the Arab standpoint, obtaining complete Israeli withdrawal is a very important matter."

Although the tentative accord does not provide for a residual Israeli military presence, it permits Israeli soldiers operating under Lebanese commanders to inspect security arrangements in south Lebanon.

After the Israeli Cabinet approved the draft agreement with Lebanon yesterday, Shultz flew to Amman, Jordan, where he discussed with King Hussein the possibility of reviving President Reagan's wider Middle East peace initiative.

Although Shultz's main emphasis in the Middle East has been on the immediate Lebanon crisis, his success in Jerusalem had raised cautious hopes about getting the Reagan plan back on track.

On the flight here, Shultz told reporters accompanying him that Hussein regarded the Lebanon agreement as a "significant step" because it showed the negotiations can cause Israel to show flexibility in its disputes with the Arab world. The Reagan plan has been blocked by the refusal of the PLO to permit Hussein to represent the Palestinian cause in negotiations with Israel.

Shultz said Hussein told him that he regards the current impasse as "a moment of frustration, of dilemma, but not a moment to lose heart."

The secretary said he had assured Hussein that Reagan feels the same way and that he had discussed with the king ways of revitalizing the peace efforts. Shultz refused to elaborate but said, "We have some ideas . . . all kinds of discussions are going on as people try to reassemble themselves after the breakdown of the negotiations."

The breakoff of talks between Hussein and PLO Chairman Yasser Arafat last month was caused in large part by opposition from minority Syrian-backed factions within the PLO. Since then Arafat and other moderate elements in the organization have moved closer to Syria's opposition to American efforts in the region.

U.S. officials had no illusions that selling the Syrians on the Israeli-Lebanese withdrawal agreement would be an easy job. Before the talks here today, however, they had said that they believed the Syrians might be more open-minded than indicated by their hard-line public stance.

A senior U.S. official accompanying Shultz said privately before today's talks, "We don't think the Syrians really have shifted gears yet and started thinking about the reality of the Lebanese-Israeli agreement and what it might mean."

"Shultz' effort today is a preliminary to nudge that process along," the official said.

After the talks were over early this evening, Shultz said, "How much they learned from our discussions as compared with what they knew beforehand, I'm not sure."

Asked if the Syrians still agreed with the principle of mutual withdrawal from Lebanon, Shultz responded, "It depends on the level of principle. At a certain level of principle, yes."

The White House said in a statement that President Reagan called Lebanese President Amin Gemayel today to commend him on "his courage and leadership," Washington Post staff writer David Hoffman reported. The White House said Reagan expressed the hope that the Lebanese Cabinet and parliament will soon approve the agreement with Israel.

The Associated Press reported the following from Tel Aviv:

Foreign Minister Shamir said in the Israeli radio interview, "If Syria does not fulfill its promise to evacuate Lebanon, we will take care to deploy and position ourselves in the safest possible arrangement for IDF Israel Defense Forces soldiers and the IDF in general."

Shamir also said Israel was "not satisfied" with a provision that would make Israeli-backed militia leader Saad Haddad second-in-command in southern Lebanon without a combat role.

Several Israeli ministers have raised the possibility of a unilateral pullback to the Awali River, 15 miles south of the existing lines. The United States and Lebanon oppose a partial withdrawal.