A U.S. warship and Marine gun batteries on shore opened fire today on a Druze artillery position in the mountains southeast of Beirut after it fired three shells that landed less than 100 yards from two Marine generals here on an inspection tour.

The use of U.S. Navy guns for the first time in defense of the 1,200-man Marine contingent in the multinational peace-keeping force sent here a year ago appeared to be part of a new French and American policy of slow escalation in using the considerable naval and air power available to protect the exposed troops.

Yesterday, France and the United States sent reconnaissance planes over Beirut and the nearby mountains after two more French soldiers were killed and France issued a sharp warning that it would use warplanes to strike back at artillery shelling its positions.

The shelling of U.S. Marine positions today occurred as fighting raged unabated across the mountains east of the capital where Druze and Christian militia forces are battling for dominance and the Lebanese Army is trying to secure the high ground beyond Beirut and roads leading into the capital.

The Druze, backed by Syria and aided by several leftist Lebanese and Palestinian factions, today scored a strategic victory in the mountains when they took a key junction at Qabr Chamoun. They also continued pounding Army positions and shelling the town of Deir Khama, in the Chouf mountains 15 miles south of Beirut, where tens of thousands of Christians from other villages have taken refuge.

As the fighting worsened, the Lebanese Army ordered a mobilization of its reserves for next week to bolster its thinly stretched forces, which are trying to block the Druze advance toward the capital and secure control of the portion of the coastal highway abandoned by Israel in its pullback Sunday.

Meanwhile, a new massacre in the Chouf--this time with Druze as victims--was reported here today to have taken the lives of 40 persons.

Lebanese authorities served notice Thursday that they intend to censor Beirut newspapers starting with Friday's editions, according to official sources quoted by Reuter. Newspaper editors said they believed the move was connected with the violence between rival militias and was aimed at cooling sectarian tensions.

The renewed shelling of U.S. Marine positions inside the Beirut airport compound came only a few hours after Druze leader Walid Jumblatt pledged in Damascus that "no accidental or erroneous shooting at multinational positions will occur" anymore.

Last night, 10 artillery rounds fell on the marines, who responded by firing six 155 mm mortar shells into the mountains south and east of the airport.

Jumblatt's statement came after he met last night in the Syrian capital with special U.S. envoy Robert C. McFarlane, who has been trying to arrange a cease-fire.

That meeting took place after Saudi Arabia announced it was giving up its mediation in the Lebanese crisis. The Saudis today reversed themselves and again sent their special envoy, Prince Bandar Ibn Sultan, to Damascus to renew their efforts to get a halt in the fighting and negotiations going for a political settlement.

McFarlane, apparently working on a parallel mission, was in Beirut again today to meet with President Amin Gemayel and Prime Minister Shafiq Wazzan.

Today's shelling of the U.S. Marine compound at the airport occurred shortly after 11 a.m. as the two American generals were about to board a helicopter parked at the landing strip.

The two, Lt. Gen. John Miller, commander of Fleet Marine Forces Atlantic based in Norfolk, Va., and Maj. Gen. Alfred Grey, commander of the 2nd Marine Division at Camp Lejeune, N. C., dived for cover into a bunker but were not hurt.

Marine spokesman Robert Jordan said the three shells landed 30 to 100 yards from where the generals were standing. He discounted the possibility it could have been an accident and said, "It was close, awfully close." He estimated the size of the shells at 122mm and l30mm.

"It was obvious that what came in here was not aimed at any LAF Lebanese Army forces position because it was right in the heart of the Marine compound," Jordan said. "Its obvious somebody is in control and has a pretty sophisticated direction," he added.

The decision to respond with both ship and shore fire came almost 1 1/2 hours after the shelling and reportedly was made by Col. Timothy J. Geraghty, commander of the Marine contingent, after consultation with commanders of the seven-vessel U.S. naval task force off the coast.

Four five-inch, high-explosive shells were fired from the frigate USS Bowen and six rounds were fired by a 155mm mortar battery next to the Marine headquarters compound.

The use of naval gunfire was clearly intended to signal U.S. intentions to hit back with more force if the shelling of Marine positions continues. A similar message was sent yesterday by the French, who threatened to use Super Etendard warplanes from the aircraft carrier Foch after the French ambassador's residence--now serving as headquarters for the 2,000-man French contingent--was shelled and two French soldiers were killed.

France has lost seven soldiers to shelling in recent days and a total of 16 over the past year in accidents and hostilities. Five U.S. Marines have been killed, including four from shelling in the past 10 days.

There has been mounting frustration among soldiers of the 5,400-man multinational force as attacks have sharply escalated on their positions.

This frustration was clearly reflected in a comment made by Miller, when asked under what conditions the Marines would fire back.

"We have established rules of engagement," he said, "but no one expects the Marines to stay hunkered down under fire from known positions and not respond."

Marine spokesmen have been careful not to identify publicly which of the various factions they believe responsible for the shelling of their positions. But Druze militia hold the general area from which the Marines determined today's and last night's firing originated--the hills just east and south of the airport.

This is roughly the same area from which the Marines were bombarded Aug. 29 when they suffered their first two combat casualties here. They replied then by sending up Cobra helicopter gunships and firing a salvo of 155mm artillery.

Two marines were killed Monday by shelling from a densely populated Shiite Moslem slum but the U.S. forces did not return fire then.

Meanwhile, reports here said Druze militia and the Lebanese Army were battling for control of a strategic highway junction at Qabr Chamoun, a vital road link between the Chouf and the Beirut-to-Damascus highway.

The Druze militia seized control of the junction early today but the Army has sent reinforcements in what government sources say is an attempt to halt the Druze advance toward the outskirts of Beirut.

Official Lebanese sources said today that Palestinians, mostly forces who have joined Palestine Liberation Organization rebel Said Musa, are now deeply involved in the fighting on the side of the Druze.

The fighting, according to several sources, has taken a high toll among civilians. Lebanese police estimate that 350 have been killed and 875 wounded since the Israeli pullback Sunday but other officials consider the estimate low.

Today, a Druze spokesman said 40 Druze civilians were killed by Christian Phalangist militiamen at a shrine in Abey, near Qabr Chamoun. They said the Lebanese Army was present but did nothing to stop the killing.

The Druze Progressive Socialist Party said the Christian militiamen stormed the shrine where 40 villagers had taken refuge, killing them all and burning down the building.

Earlier this week, Christians accused Druze militiamen of killing more than 200 Christians in Bhamdun, eight miles northeast of Abey.

Meanwhile, Druze militamen were reported today to be pounding Deir Khama, where Phalangist spokesmen said more than 40,000 Christians have taken refuge from the fighting. Red Cross workers have been unable to reach the town to deliver food, water and medical supplies despite their efforts to arrange a cease-fire with the Druze.

A U.S. Embassy spokesman said an American F14 warplane flew over Deir Khama as a "humanitarian gesture" this afternoon, apparently in an effort to stop the shelling. But local radio reports said the Druze continued to pound the town into the early evening.