Syria today angrily denounced U.S. special envoy Philip C. Habib's latest mission to the Middle East, calling it a smokescreen to divert Arab attention from the new military pact between Israel and the United States.

The bitter Syrian attack, in an editorial in the official newspaper Tishrin, threatened to seriously undercut Habib's mission.

The editorial charged that the U.S.-Israeli agreement announced last Monday had disqualified the United States from "legitimately" acting as intermediary in the region's search for peace. The agreement calls for the United States and Israel to come to each other's assistance militarily to cope with threats from the Soviet Union or alleged Soviet surrogate powers in the Middle East.

U.S. officials have said the pact with Israel was not directed against other Middle Eastern nations and was only intended to discourage Soviet activity in the region.

In the editorial, Syria also vowed that the explosive issue of its antiaircraft missiles in Lebanon's Bekaa Valley was not negotiable.

The Syrian attack, which was later broadcast in full over the state radio, came as Habib concluded talks in Israel and Foreign Minister Yitzak Shamir warned that Israel would not tolerate the situation in Lebanon "indefinitely."

Israel has warned repeatedly that unless Syria can be induced to remove the missiles it set up in the Bekaa Valley in April it will take steps of its own to neutralize them.

Syria installed the surface-to-air missiles after Israeli planes had shot down two Syrian helicopters full of troops in the area, and it was the conflict over the missiles that brought Habib to the Middle East on a mediating mission during the spring and summer.

Habib visited Damascus earlier this week for talks with President Hafez Assad, as part of his fourth foray in the area this year to reinforce the fragile truce he helped broker last May between Israel and the Palestine Liberation Organization in southern Lebanon.

In what was clearly Syria's harshest attack on the United States since Habib began his mediating efforts, today's editorial accused the United States of involvement in the explosion last Sunday of a booby-trapped car in the heart of Damascus. It left more than 200 persons dead or wounded.

Although the Syrian government had earlier blamed the explosion on the extremist Moslem Brotherhood, which has been waging an underground war against the Assad government, Tishrin today termed it "an American Zionist reactionary gift" timed to coincide with Habib's arrival in the Syrian capital this week.

The newspaper said that Habib's mission had been timed to "assure a minimum Arab reaction" to the new agreement between the United States and Israel, which the paper termed "a suspended declaration of war" by Washington.

"He came to talk about the Syrian missiles in Lebanon in order to divert Syria's attention away from the basic issue -- the strategic pact," the newspaper declared. "Habib knows, and he has been told for the last time, that the missiles are not negotiable. What is done is done."

Accusing the United States of "booby-trapped-car diplomacy," the Syrian newspaper charged that Washington had nothing new to add to the discourse with Damascus. "If Habib makes a thousand trips to Syria without carrying anything new or useful based on a new American stand and vision," the editorial continued, "Syria will have nothing to add to what it has said previously on the missile question."

The newspaper also said that as long as the United States "continued to adopt an Israeli policy" in the area, Syria found little to discuss with Washington. Because of that, the newspaper concluded, "we do not see the United States as legitimately qualified to take part in what it calls the search for peace."

The tone and vehemence of the editorial contrasted with previous U.S. depictions of Habib's talk with President Assad in Damascus Wednesday as "warm and friendly."

Habib has refused to comment publicly on his discussions with leaders in the area. He began his mission a week ago in Lebanon and has since visited Syria, Jordan and Israel.

He is to hold talks in Riyadh Sunday with Saudi Arabian officials before determining whether there are any grounds for further discussions in the area and reporting back on his mission to President Reagan.