NEW YORK, SEPT. 27 -- The United States has assured Israel that if the Jewish state is attacked by Iraq, the United States "will stand by its commitment to Israel's security" and retaliate against Iraq even if that requires military force, U.S. and other diplomatic sources said here today.

The sources said the assurance was given by Secretary of State James A. Baker III to Israeli Foreign Minister David Levy at a meeting here late Wednesday. The sources added that Baker acted to calm Israeli concern about threats made by Iraqi President Saddam Hussein last Sunday to strike at Israel and oil installations in Saudi Arabia if Iraq suffers unduly from the economic embargo imposed against it by the U.N. Security Council.

Levy did not specifically request the assurance, the sources said, but Baker gave what one source called "a promise that the United States will stand by its commitment to Israel's security" in an apparent bid to head off a possible Israeli attempt to take the issue to the Security Council. After Saddam threatened Israel on Sunday, Levy raised the possibility of making a protest to the council, a source said. Levy is here to attend the U.N. General Assembly's annual session.

The sources said the United States would prefer that Israel maintain the low profile it has kept since Iraq's Aug. 2 invasion of Kuwait and not disturb the coalition of Arab states that the United States has put together in opposition to Saddam. However, the sources said, Baker wanted to make clear that even if the coalition with the Arabs is damaged by the United States overtly aiding Israel, the U.S. commitment remains unshakable.

The sources also pointed to statements made before Congress on Tuesday by John Kelly, assistant secretary of state for Near Eastern and South Asian affairs, as a veiled hint of the U.S. stance. They said Kelly did not make a specific pledge to come to Israel's aid militarily but told members of Congress that the United States would consider an attack against Israel as a very serious matter requiring action.

The United States and Israel have no formal treaties regarding Israel's defense. However, U.S. administrations for four decades have stated their intention to guarantee Israeli security, and the two nations share information and intelligence under a strategic operations agreement.

The sources also said U.S. officials do not consider it likely that Saddam would launch an attack against Israel exclusively, even if the Iraqi leader was to try to marshal support in the Arab world capable of splitting the coalition arrayed against him. Instead, they said, such an attack probably would come as part of a decision by Iraq to strike in several directions, possibly including Saudi Arabia, and would almost certainly mark the advent of all-out war between Saddam's military and the multinational force deployed in the Persian Gulf region.

In a separate interview today today, Levy said the United States has agreed to explore with Israeli military experts whether the proposed $21 billion sale of advanced U.S. weapons to Saudi Arabia will erode Israel's qualitative military edge in the Middle East and, if so, what must be done to restore it.

"I put forward {to Baker} a proposal to have experts from Israel come over and have a close look at whether the qualitative edge is being maintained," Levy said. "I'm quite convinced there was understanding of the logic and justice of this request. And I can tell you it will be done."

Washington's plan for new arms sales to Saudi Arabia and U.S. desires for Israel to keep a low profile have caused great anxiety in Israel that it is losing its place as the main U.S. ally in the Middle East.

While Levy did not say so in the interview, other sources familiar with the Wednesday meeting said it began on a chilly note with Baker complaining angrily that Israel has not been helpful to the administration's hopes of getting the Saudi sale through Congress without problems.

Specifically, the sources said, Baker charged that Israeli Defense Minister Moshe Arens, on a recent visit to Washington, left the impression he understood how important the sale was for administration policy. Then, Baker reportedly said, Arens returned home and assailed the sale as a threat to Israeli security.

The sources said Baker also complained that Levy, Arens and other Israeli cabinet officials were creating confusion by bombarding Washington with differing lists of what they contend Israel needs as compensation for the Saudi sale.

"This tremendous amount of armaments being offered to Saudi Arabia has raised eyebrows about Saudi Arabia's capabilities and needs," Levy said in explaining the Israeli concern. "Who can guarantee with surety what might happen tomorrow with these arms. They are disturbing questions. They need to be raised, and we raised them." That, Levy said, was what caused him "to put forward my proposal which should go a long way toward being a testing stone for obviating future dangers to Israel's security."

Asked when the consultations would begin and how they would work, Levy indicated that these questions still are unanswered. "We're in touch; we don't approach each other as aliens, and we think it will be worked out," he said.

Levy also said he made clear to Baker Israel's feeling that it should be forgiven its $4.5 billion military aid debt to the United States, if the administration forgives Egypt's $7.5 billion debt because it is contributing to the forces arrayed in Saudi Arabia against Iraq.

"We are not envious of Egypt, but our situation is no less serious because of the gulf crisis," he said. "Our security burdens have increased greatly. So we feel that if the implications of the crisis on the economies of countries like Egypt and Turkey warrant relief, the same should apply to Israel. One should not ignore that."

On another contentious issue -- Israel's desire for a $450 million U.S. loan guarantee to supply housing for thousands of Soviet Jewish immigrants -- Levy said one of his key aides, Eitan Ben Tsur, has been working since Wednesday night with Dennis Ross, chief of the State Department's policy planning staff, to overcome the differences. "We are near, and we hope we can give it the final touch in a day or two," Levy said.

Levy acknowledged that Washington's request for a low Israeli profile, made within hours after Iraq's invasion, had caused "a malaise about U.S.-Israeli relations" in his country.

"The low profile was pursued so vigorously by Washington that it was made to seem Israel had vanished from the region," he said. "The U.S. administration knew what we were doing. But to American public opinion -- to the man in the street -- it was made to seem we weren't there."