Two French military observers on patrol were gunned down in a Shiite suburb today, and the group claiming responsibility, the Islamic Jihad, warned that it would try as spies five Americans it holds hostage.

Sgts. Maj. Henri Grecourt, 35, and Henri Perrot, 34, were patrolling the densely populated Shiite Moslem suburb of Burj al Barajinah, when their jeep was ambushed this morning. They were sprayed with machine-gun fire by a carload of gunmen as they drove along a dirt road.

Last week, the deputy commander of the French military observer force, Lt. Col. Claude Gueno, 45, was shot to death with a single bullet in the head as he walked near the museum crossing in the predominantly Moslem sector of Beirut. No one claimed responsibility for that shooting, on Jan 7.

The French observers, who wear white helmets and are armed only with pistols, were sent here last March after the French contingent of the multinational force pulled out of Lebanon. Their mission is to supervise a truce between west and east Beirut and to monitor Druze-Christian fighting in the hills.

The deaths of Grecourt and Perrot brought to four the number of French observers killed here since last June. The first was shot by a sniper that month.

"The two French spies were liquidated this morning after they were caught red-handed spying on our youths and positions in the Moslem suburb as part of their mission to monitor the movements of our youth and report to the Atlantic, Israeli and Phalangist intelligence," an anonymous telephone caller, who said he was speaking on behalf of Islamic Jihad, told two foreign news agencies in Beirut.

The same group claimed responsibility for the kidnaping last Tuesday of the Rev. Lawrence Martin Jenco, Catholic Relief Services director here. The caller said Islamic Jihad is holding five Americans who have disappeared in predominantly Moslem west Beirut since last March. He said they were all in good condition and would be released unharmed if all Americans leave Lebanon.

Today's caller accused the Americans of spying and threatened to punish them. "We wish to notify U.S. State Department spokesman Alan Romberg that William Buckley, Jeremy Levin, Benjamin Weir, Peter Kilburn and Lawrence Jenco are now in our custody preliminary to trying them as spies," he said.

Buckley, a political officer at the U.S. Embassy here, was abducted by gunmen on March 16. Levin, the Beirut bureau chief of Cable News Network, was kidnaped on his way to work March 7. Weir, a Presbyterian minister, was abducted in May, and Kilburn, an elderly librarian at the American University of Beirut, failed to show up for work on Dec. 3.

"These people are using journalism, education and religion as a cover, and they are in fact agents of the CIA. They have exploited the hospitality accorded to them by Islamic areas to persist in their subversive activities and will get the punishment they deserve," the caller warned.

It was the first time that the shadowy group has referred to the missing Americans by name, and the first time that it has threatened to take action against them.

After the same group announced to The Associated Press Friday that it was holding Jenco, the caller was asked whether he could give the names of the Americans in captivity. He responded that he would call back.

The Islamic Jihad has claimed responsibility for the massive bombing of the U.S. Embassy in west Beirut in April 1983, the suicide truck bomb attacks against the U.S. Marine Beirut headquarters in October of that year and for another suicide truck bombing at the U.S. Embassy annex building northeast of Beirut last September. A series of bombings targeting French, American and Kuwaiti interests in December 1983 was also part of its operations, according to anonymous callers claiming to represent Islamic Jihad. The ambush of the French observers today occurred in the heart of territory supposedly under the control of the mainstream Shiite Amal movement of Justice Minister Nabih Berri.

Friday's caller said, "We address a special warning to Mr. Nabih Berri that he will bear the responsibility of any intervention to release any of the Americans we hold, because we are the stronger and we shall remain the stronger." Berri has been credited with the successful release of Swiss Charge d'Affaires Eric Wehrli on Jan. 7, four days after Wehrli was kidnaped by the relatives of a Shiite activist.

Attacks against the French have been aimed at scaring them out of Beirut. French sources in Beirut said that no decision had yet been made yet to pull out the observers, sent at the request of the Lebanese government.

French diplomats no longer reside in the Moslem part of the capital, although the diplomatic mission here has been maintained. Diplomats serving in the western sector commute daily. The French have established a separate embassy in a Christian-held neighborhood on the northeastern edge of Beirut.