Syria has secretly informed members of the Lebanese government that Syrian President Hafez Assad will not withdraw his 40,000 soldiers from Lebanon's divided Bekaa Valley until Lebanon signs a written security treaty with Syria, senior Lebanese officials say.

In the first indication that they may be willing to negotiate on a troop withdrawal, the Syrians have said they want such a treaty to provide ironbound guarantees that Lebanese or Syrian troops, or a combination of both, could prevent the headwaters in Lebanon's Bekaa Valley of Syria's Orontes River--which irrigates much of Syria and supplies it with electric power--from falling into Israeli hands, Lebanese officials said in interviews in Beirut.

The reported Syrian demand underscores the broader importance of growing water needs, and dwindling water resources, in Israel, Lebanon, Syria and Jordan. Many experts are convinced that the rivers and water wells of those countries are important keys not only to the chances of success of the American-sponsored troop withdrawal plan for Lebanon, but also to the prospects of another Middle East war.

A five-week inquiry in Israel, Lebanon and Syria suggests that the concern over water supplies lies behind these other developments:

* Lebanese President Amin Gemayel's government harbors fears that Israel will alleviate its growing water crisis by diverting into Israel part of Lebanon's Litani River, following published plans dating back 40 years. Israeli officials say that they have no such plans now.

* Through new pipes and improved pumping installations, Israel appears to be enhancing the flow of another Lebanese river, the Hasbani, which already flows into Israel, forming part of the Jordan River's headwaters.

* There are strong suggestions, though no proof, that Israel may have been siphoning water underground from Lebanon to its northern Galilee settlements since its earlier incursion into Lebanon in 1978.

* Finally, Israel and Jordan are competitvely drilling into a large underground lake of fresh water under both the east and west banks of the Jordan River, which has become a tiny and increasingly saline trickle. There is a race to see who can pump out the underground aquifer first.

The vulnerability of Israel's dwindling water supply, much of which comes from the Jordan River and its headwaters, has been a constant of Middle East politics since the creation of the Jewish state in 1948. In the 1960s Arab states under the leadership of Gamal Abdel Nasser of Egypt prepared projects to divert the Jordan headwaters, including the Hasbani, away from Israel. Israeli air raids halted the Arab diversion projects, and in 1965 the Arabs abandoned them.

The Eisenhower administration also recognized the importance of water supply to Middle East politics by attempting unsuccessfully to get Arabs and Israelis to accept a comprehensive regional water-sharing plan along the lines of the Tennessee Valley Authority.

Israel's military victories over its Arab foes have dramatically changed the picture of water distribution in a region where "making the deserts bloom" has been a major goal. In the 1967 war, Israel captured not only the West Bank, Gaza, Sinai and the Golan Heights but also the remaining headwaters of the Jordan, including Syria's Baniyas, a fresh-water stream that springs from rocks in what is now the Israeli-annexed Golan Heights.

And in the 1978 and 1982 wars against Lebanon, the Israeli Army and its southern Lebanese allies, the militia of former Lebanese Army major Saad Haddad, established firm control over the Wazzani, a small spring and stream feeding the Jordan, as well as almost the entire length of the Hasbani River and rivulets feeding the Hasbani from the snowy crest of Mount Hermon, which straddles Israeli, Lebanese and Syrian territory.

After a tank and artillery battle with Syrian troops, Israel in July 1982 took control of the entire lower length of the Litani, including the lake and dam at Qirawn. The Litani River runs east to west in southern Lebanon, about 40 miles from Beirut. It is about 20 miles from most of Israel's border but comes within a few miles of the northernmost tip of Israel at Metulla.

Syria's concern about the headwaters of the Orontes (called Asi by Arab geographers) appears to be one of the most important reasons for Syria's determination to keep its troops in Lebanon. Syrian disappointment with the slow development of its rather meager oil resources, and the slow growth of its industry, have forced it to rely heavily on its traditionally rich agriculture.

Syria's richest farming areas lie in a narrow strip of land along the northern coast, between the Lebanese and Turkish frontiers. Fruit, olives, tobacco and cotton, originally produced only there, have recently expanded into an area to the east, where the northward continuation of the Lebanese mountains falls sharply on the east to the Orontes River valley.

That valley was a zone of marshes, reclaimed by Syria in the early 1970s to form one of the country's newest and most fertile farming areas. Before flowing into the large lake near the Syrian city of Homs, the Orontes drives a major hydroelectric power station, generating electricity for much of Syria's heartland.

Syrian, Iranian and Palestine Liberation Front forces--the latter quarreling over Chairman Yasser Arafat's leadership--now control the small streams near Baalbek that form the Orontes.

Lebanon's concerns have been exacerbated by long-standing and open discussion within Israel of the desirability of diverting into Israel part of the Litani. In an interview, Israel's Science and Technology Minister Yuval Neeman acknowledged that Israel has long been interested in obtaining Litani water and has recently conducted soundings and surveys of the Litani in Israeli-occupied south Lebanon.

However, Neeman said Israel had shelved such plans since the June 1982 Israeli invasion of Lebanon, because Lebanon's upstream use of its own water resources was so efficient that "only a trickle" of Litani water, not worth diverting, remained to flow near Israel's border.

"One of the first acts of the Israelis when they arrived at Qirawn," recalled Kamal Khoury, chairman of Lebanon's Litani River Authority, "was to seize all the hydrographic charts and technical data on the dam and the river and take a complete set to Israel."

"These were considered legitimate items of military intelligence," responded Neeman. The minister also admitted that seismic soundings and surveys had been carried out concerning the possibility of boring a diversion tunnel--first proposed in a water study under the British Mandate in Palestine in 1943, and again in 1954 in a plan published by the Israeli government and prepared by Joseph Cotton, an American engineer. It was to be located at the nearest point on the Litani to the Israeli frontier.

Neeman said he had asked Israeli Defense Minister Ariel Sharon during the Lebanon campaign last summer what he thought about getting Litani water for Israel. Sharon's reply, said Neeman, was, "Have you seen the Litani lately? It's only a trickle."

Lebanese and U.S. negotiators feared that Israel might raise the issue of sharing Litani water, which Khoury said is not a "trickle" but close to 700 million cubic meters in a normal year's flow, during the talks preceding the April 1983 Lebanese-Israeli accord for withdrawal of foreign troops. The accord is now blocked by Syrian refusal to withdraw its forces from Lebanon.

Lebanese diplomat Antoine Fattal had carefully prepared a file, with the help of Khoury's Litani experts, to show that Lebanon needs and uses all of the Litani's water for its own "green plan," to irrigate the lower Bekaa Valley and to generate electricity in Lebanon's underground power station south of Lake Qirawn. Israel, however, did not raise the issue.

"Later," Neeman said, "if Lebanon cares to sell us some of that little water, we might be interested in buying it. Now, it's not worth the trouble or the mention."

David Karmeli, an agricultural engineer at Israel's Haifa Technion university, who has designed many water projects for Israel, said he doubted whether there was any project to divert water from Lebanon but that if there were one, it would be under Israeli military control and a military secret.

In southern Lebanon, officers of the Norwegian U.N. contingent and Lebanese water experts were told that Israeli military authorities had ordered local Lebanese farmers to stop drilling new wells, and that some of their old wells had been bricked up. The orders, according to Khoury Mansour, a pro-Haddad Maronite parish priest in the southern village of Klaid, were transmitted through Haddad.

This denial of well water, similar to that ordered in the Israeli-occupied Jordan West Bank on Arab property to conserve water for Jewish settlements, strengthened Lebanese suspicions that are as yet unproved. These suspicions are that in addition to the pipes Israel has laid openly to pump additional water from Lebanon along the course of the Hasbani, underground water has been secretly channeled out of Lebanon into Israel since 1978.

In a brief encounter with this reporter, Haddad scoffed at such suspicions.

"If you think the Israelis are stealing our water," he said, "just take a look around. I would be the first to know if something like that were going on, and the first to disapprove. Didn't you know that they gave us water when we needed it last summer?"

Still visible above ground near Metulla, the Israeli border village closest to south Lebanon's well-watered Marj plain, are pipes. Through them, Israel pumped water from northern Galilee to three Lebanese villages during the Israeli invasion of Lebanon last summer. In April of this year, the Israeli water authorities and Army also drilled a large new well for thirsty Lebanese farmers near Bint Jubayl in Lebanon's dry "panhandle," a rocky, Haddad-controlled zone south of the Litani's westward course.

According to Litani authority chairman Khoury, that region would be fully irrigated by the Litani if Lebanon's central government could resume total control of the area from Israel and the Haddad forces.

Jordan also has troubles with Israel concerning the use of the region's sparse waters.

Last year, Jordanian water engineers discovered the vast aquifer under a strategic hill called Umm Qays, where Jordanian and Iraqi artillery used to shell Israel during the 1967-70 war of attrition in the Jordan Valley. The hill faces several Israeli settlements, north of the Israeli town of Bet Shean. The Jordanians began to pump this water into Jordan's East Ghor irrigation canal to augment supplies to Jordan's rich farm belt in the Jordan Valley.

In May, proclaiming that five Jordanian drilling projects around Shatt al Barad, where the old Syrian, Israeli and Jordanian borders meet, threaten to steal water underground from the Yarmuk River that should go to Israel, Israel's water authority began drilling in Wadi al Hama, on the Israeli side.

Meanwhile, according to remarks by Yisai Zemach, an Israeli water official, published in March, Israel would increase underground pumping of water from the Yarmuk River. Jordan has long planned to build a U.S.-designed storage dam on the Yarmuk, which flows between Jordan and the Golan Heights.