Boston — The man who was America's top diplomat in the Middle East until four months ago is urging the United States not to take the ''easy way out'' by pulling US marines out of troubled Lebanon.
Former Mideast envoy Philip C. Habib says such a pullout ''would be a contradiction of the solemn commitment made by the US government'' to Lebanon and to the Middle East as a whole.
''I think it would seriously damage the capacity to restore a viable peace process,'' he says.
Mr. Habib, who withdrew four months ago as President Reagan's special Mideast envoy, outlined his view of the Middle East and his approach to diplomacy during a 1 1/2-hour talk Tuesday at Boston University. He stressed that he was no longer speaking for the Reagan administration.
The White House recently initiated a widespread examination of US policy in the Middle East. This comes at a time of mounting US marine casualties in Beirut , a reported decline of US credibility in the region, the continued rearming of Syria by the Soviet Union, and heightened tension in the Gulf war between Iran and Iraq. Nonetheless, Habib's comments were basically optimistic.
''An integral, sovereign Lebanon is still possible. It is not yet lost to a point where all you can argue is the size of various partitioned areas,'' he says, referring to the feuding Maronite Christians, Druze, and Sunni and Shiite Muslims who have completed a de-facto partition of the small state.
''These people all know each other from childhood. They've sat at tables together before and in my opinion, there is no reason why they can't come to an agreement.'' But, he adds, ''Whether they will is another question.''
Habib says the key to solving the Lebanese crisis is twofold. First get the foreign forces - the Israelis, Syrians, and the Palestine Liberation Organzation fighters - out of Lebanon; then foster an atmosphere in which domestic political compromises can be made.
In addition, Habib says the US has a vital interest in getting other countries in the region involved in a workable, wider ''peace process.''
The US, he says, has the ''capacity to produce compromises'' among warring Mideast parties. Habib adds, ''There is no other nation that can play that role in the Middle East. . . . The Soviets can't.''
He says that even the Syrians, who have most recently played the spoiler to US efforts in Lebanon, can be drawn into a peace process.
''I believe the Syrian government has its own national objectives, and I believe that if we can bring those national objectives into some degree of harmony with the objectives of others in the area, the Syrians will negotiate and they will not reject a comprehensive peace,'' he says.
A career foreign-service employee, Habib was called out of an initial retirement in 1981 to become special envoy. He played the central negotiating role in easing Israeli-Syrian tension in the 1981 missile crisis in Lebanon's Bekaa Valley. In the summer of 1982, Mr. Reagan called him back into action following Israel's invasion of Lebanon. During the war in Lebanon, Habib negotiated 12 cease-fires and eventually arranged the withdrawal of PLO forces from Beirut. He retired as special envoy last July after Syria announced that he would no longer be welcome in Damascus.
For his efforts he was awarded the Medal of Freedom, America's highest civilian award, and he was nominated in 1982 for a Nobel Peace Prize.