The war in Lebanon, the longest and most controversial in Israel's history, has exacted a heavy toll from the Israeli Army that will linger long after the last Israeli soldier returns home in a few weeks, in the view of senior Army officers and military analysts here.

As a result of almost three years in Lebanon, the Israel Defense Force (IDF) will be smaller, less well-trained and led by fewer experienced officers. During that period, the Army's dependence on U.S. military aid to maintain Israel's "qualitative edge" over the military forces of neighboring Arab countries has increased and is expected to continue to do so.

The war tarnished the Israeli military's image and provoked the first serious resistance movement in the ranks of the reserve officers and soldiers who form its core. As a result of these and other developments, the Army that is leaving Lebanon now is less sure of itself than it was in June 1982, when it stormed across the border, and by most accounts it is less prepared to carry out its principal mission -- to defend Israel against the military forces of the Arab states.

It is still the best army in the Middle East, and in no immediate danger of losing its clear edge over the forces of Syria and other Arab states. Of that, senior Army officers, military analysts and even the strongest critics of the Lebanon war here have no doubt. But these same people, in a series of interviews, acknowledged that the Israeli military has been damaged by the Lebanon experience, that the damage has increased as the occupation stretched into its third year, and that the Army will need time to recover.

As the final withdrawal from Lebanon approaches, the warnings about the impact of the Lebanon experience on the Israeli Army have become more frequent and urgent. They have come in particular from the military correspondents of Israeli newspapers, a group of men whose professional lives revolve around the Army and who are granted unusual access to all levels of the military.

Zeev Schiff, military editor of the independent newspaper Haaretz and coauthor of a book on the war in Lebanon, returned to Israel earlier this year after an 18-month sabbatical in the United States. In February, he produced a searing, five-part series on what he found here.

"It is not merely a different Lebanon; it is first of all a different IDF," Schiff wrote. "It's astonishing and painful. What the people who initiated the war have done to the IDF is unforgivable."

Schiff said he found "a frustrated Army in Lebanon," its morale in steep decline, its training programs in disarray, the soldiers consumed with their own safety in a sea of hostile Lebanese Shiite Moslems.

The war, he said, shattered several "myths" about the supposedly invincible Israeli Army, not only because of its often sluggish performance during the heavy fighting of June 1982 but because of the long occupation, when the Israelis learned firsthand "how military might is rendered impotent, how an Army that was considered a winner cannot realize its military strength."

Schiff's series had a major impact here, although his observations were not new. In March 1984, Eitan Haber, writing in the conservative newspaper Yediot Aharonot, said many of the same things.

Haber said the Army had lost its traditional sense of initiative in Lebanon as "day-to-day difficulties grind it down." Training, the sharpening of military skills of the young soldiers who will be in the reserves into the next century, was largely ignored as Israeli units searched the countryside for roadside explosives and booby-trapped cars.

Meanwhile, Haber wrote, scarce economic resources were being poured into the Lebanon occupation, weakening the underlying support system for the soldiers in the field and the preparations for the real military challenges Israel faces, particularly from Syria.

"The question of whether the war in Lebanon was justified or unnecessary will remain unanswered for a long time, if it is ever answered," Haber said. "To the other question, whether the IDF was hurt as a result of the lengthy stay in Lebanon, the answer is unambiguous: yes, absolutely."

Senior Army and Defense Ministry officials do not dispute the main findings of Schiff, Haber and others, although they say that the critics exaggerate the negative impact of the Lebanese experience on the Army and that none of the damage is irreparable.

There were some gains from the war for the Army, said Maj. Gen. Menachem Einan, chief of the its planning branch. New weapons systems were tested under combat conditions, and large numbers of troops received indispensable operational experience, he noted.

"Against the Syrians, we proved our military capability. On the ground, in the sea and in the air, we proved that we have the decisive edge," Einan, who led the Israeli Army drive through central Lebanon, said. He added that organizational and other weaknesses that were exposed by the war can be corrected now.

These gains, however, came at a high price. More than 640 Israeli soldiers have been killed in Lebanon, almost half of them since the main body of Palestine Liberation Organization guerrillas left Beirut in September 1982 and Israel's primary military objective of the invasion had been achieved.

Most of the lessons learned and experience gained from the war came during the first few weeks of heavy fighting. Yet the Army stayed on in Lebanon, not because of any military imperative but to back up the government's long and ultimately fruitless attempt to extract political concessions from the Lebanese government.

It was during this protracted occupation, when the Israeli Army was transformed from a force known for its mobility and aggressiveness into a largely static one engaged in quasi-police functions, that most of the damage was done, critics say.

"First of all, it was a long and enduring war, which lasted longer than we had planned," Einan said. "As a result, the burden on the IDF in terms of length of reserve duty and numbers of units deployed in Lebanon was larger than we would have liked."

The nature of the occupation, "the continuous friction with the local population," has had a "degrading effect" on Israeli soldiers, the long-term consequences of which still are not clear, he said. The high number of casualties, coupled with "the seeming failure to achieve all of the objectives in Lebanon, does not have a positive effect on the fighting units," Einan said.

In addition, he said, the long preoccupation with Lebanon has disrupted and curtailed the training of both regular and reserve units, whose field experience in Lebanon is not likely to be of much use should there be another major Middle East war.

"A soldier who plays detective after a booby-trapped Mercedes is not necessarily a soldier who knows how to storm a Syrian position when the test comes," Haber wrote more than a year ago.

The most easily measured impact of the war on the Army is economic. After the Middle East wars of 1956, 1967 and especially 1973, Israel significantly increased its military strength, more than matching similar buildups in the Arab states, noted Dov Tamari, a reserve brigadier general and one of the authors of "The Middle East Military Balance," an annual publication of the Jaffee Center for Strategic Studies at Tel Aviv University.

"The first war after which the IDF didn't strengthen itself is Lebanon," Tamari said. "On the contrary, the talk about reducing the strength and size of the IDF started in 1983."

While Syria, with generous support from the Soviet Union, has replaced its losses from 1982 and continued to enlarge its military force, the Israeli military began a new fiscal year April 1 with a Defense Ministry budget of about $2.6 billion, compared with $3.2 billion two years ago.

Much of the difference will be made up with a planned increase in U.S. military grants to Israel from $1.4 billion to $1.8 billion. But that means that the United States will finance about 40 percent of Israel's total military spending this year, increasing the Army's dependence on its American benefactors. Moreover, most of the U.S. aid must be spent to purchase increasingly expensive weapons systems and does not contribute directly to the Army's operational needs.

Einan and other officials insist that the cutbacks will not reduce Israel's military strength -- contradicting frequent warnings by Defense Minister Yitzhak Rabin that the cuts "mean that the IDF's fighting strength will be reduced" and that they will entail "both short- and long-term risks" to the country. While Rabin, in a fierce bureaucratic battle to preserve his budget when he issued those warnings, may have exaggerated, there is no doubt that the Israeli military, like the country as a whole, is entering a period of austerity.

According to Einan, the military will reduce spending on food, clothing and personal equipment allowances to a minimum and eliminate what might be considered frills, such as the popular Army radio station.

But the cuts also will go deeper into the military structure. The Army plans to release from service a large number of career officers and noncommissioned officers this year. The exact number has not been disclosed, but it is believed to involve several hundred, whose experience will be largely lost to the Army except when they are recalled for reserve duty.

Training, which was severely limited because of the demands of Lebanon, will remain reduced, and there are likely to be cuts in research and development.

"The profile of activity will be reduced greatly, and that includes training, less vehicles, fewer engine hours," Einan said. "We will cut a little on the strategic reserves, at least at the margins."

No exact cost figure for the war and occupation has been produced by the government, but Menachem Meron, director general of the Defense Ministry, said the "operational costs" were about $1 billion. Most of this was spent in the first months of the war for fuel, ammunition and additional supplies.

In addition, Meron estimated the cost of the Army's stay in Lebanon since the fall of 1982 -- a period in which the Army constructed a defense line along the Awwali River and then dismantled it -- at $200 million to $250 million a year. But critics outside the Defense Ministry say those figures do not include Army salaries paid to the large number of reservists mobilized because of the occupation.

The total direct cost probably has been at least $2 billion, exceeding the $1.5 billion in emergency economic grants during the next two years that Israel is seeking from the United States. These direct costs do not include the damage caused to the civilian economy by the long and repeated mobilizations of reservists, many of whom had to spend 90 or more days a year away from their civilian jobs.

Tamari, a veteran of all of Israel's wars since 1956, said the Lebanon conflict accelerated processes already under way in the military and Israeli society. The real turning point, he said, was the 1973 war, when Israel was caught off guard by a surprise attack by Egypt and Syria and suffered enormous losses before turning the tide.

In response to that trauma, the Army underwent a huge buildup, doubling its strength, but at the price of a decline in the quality of its leadership.

"Officers were jumped up two ranks quickly," Tamari said. "There was no time, especially in the reserves, to build an infrastructure of commanders."

In 1973, Tamari said, reserve units remained mobilized long after the cease-fire, a process that was repeated during the Lebanese occupation and that accelerated public questioning here of the military.

"The IDF is not the most important institution, and generals are not the elite any more," he said. "Economic problems have some or more priority now. The weight of the IDF in Israeli society has grown lower and lower, but especially after 1973."

Tamari said these trends will continue, a sign of what he sees as the growing "maturity" of the Israeli public, which feels less threatened today than at almost any time in the past. Future Israeli leaders, he said, will have to understand what Menachem Begin and Ariel Sharon, the prime minister and defense minister who planned the Lebanon invasion, did not.

"The Israeli government has to realize that if any war in the future is not a direct war initiated by Arab armies on Israel, there will be no consensus here," Tamari said.

Yet the Army must continue to prepare for just such a "direct war," and with fewer resources at its command. Enough time and money eventually can overcome many of the problems with which the Israeli Army leaves Lebanon. Strategic reserves can be replenished, lost training days made up.

Not so easily measured, or made up, is the damage done to the spirit of the Israeli Army, a source of concern to its professionals.

Lebanon, said a senior Army officer who asked not to be identified, "is like a hangover that doesn't go away. A kind of battle fatigue seeped through the ranks and stayed. I agree that we face two main challenges now. The first is to get the IDF out of Lebanon. The second is to get Lebanon out of the IDF."