This was the week when it became uncomfortably clear in Washington that the problem of United States Marines in Lebanon may require seeking a solution in Moscow.
The problem is that political pressures are mounting to untangle the Marines from the internecine warfare in Lebanon. President Reagan wants them out as much as anyone else. But he wants them to come out ''with honor'' and as part of a general pacification process which could be called a success for US intervention.
There is no general pacification process under way. The reason was recognized in the letter President Reagan sent to Capitol Hill on the subject Monday. In the letter he said that ''there is no question about the complicating role of the Soviet Union and Syria.'' He said President Amin Gemayel of Lebanon could have had ''national reconciliation already,'' but ''on Syria's terms.''
That is precisely the situation. American diplomacy worked out a Lebanese settlement plan last year on other terms. The May 17 agreement which US Secretary of State George Shultz negotiated between the Gemayel regime in Lebanon and Israel provided for the reconstitution of an independent Lebanon on terms favorable to Israel. In effect Israel would have become the principal outside influence in Lebanon.
Syria vetoed that agreement by refusing to have any part in it, and by refusing to withdraw its forces from Lebanon until the May 17 agreement had first been wiped out and Israeli forces withdrawn from all of Lebanon. Syria was able to make good its veto because Syria is backed by Moscow in the form of the latest Soviet weapons, manned by some 7,000 or 8,000 Soviet troops.
Syria wants a Lebanon settlement on Syria's terms, which means a Lebanon in which Syria, not Israel, is the major outside influence. If Mr. Gemayel wants to get control of all of Lebanon, he can have it - but only if he accepts it from Syria, not Israel.
Over the past week Washington was still hoping that somehow the May 17 project could be salvaged through the mediation of King Hussein of Jordan. The King, Washington hoped, would obtain from PLO Chairman Yasser Arafat permission to negotiate with Israel for a Palestinian state on the West Bank.
Mr. Arafat may or may not be willing to authorize King Hussein to bargain with Israel on behalf of the Palestinians. But King Hussein lives next door to President Hafez Assad of Syria, who has an army of nearly half a million soldiers who have had several years of Soviet training and been resupplied recently by Moscow.
King Hussein would be risking his kingdom, his life's work, and his very life to negotiate with Israel without the approval of Mr. Assad, particularly now that Mr. Assad has become the new folk hero of some Arabs for blocking Israel's political and economic penetration of Lebanon, and for daring even to defy the 16-inch guns of the USS New Jersey.
American diplomacy has long prided itself on keeping the Soviets out of the Middle East diplomatic game. American diplomacy negotiated the Camp David agreement between Egypt and Israel without any Soviet role. But the chances for continuing to keep the Soviets out have been washed away by the tilt of the Reagan administration toward Israel.
The latest US agreement with Israel, for ''military coordination,'' eliminated any claim Washington had to being an impartial mediator between Israel and the Arabs. The essence of Camp David had been just that - the US being friendly to both. Former President Carter was as concerned at Camp David about the Arabs as about the Israelis. If anything, he was friendlier with President Sadat of Egypt than with Prime Minister Begin of Israel.
The Arabs trusted Mr. Carter to be fair to them and their interests. The Arabs now regard the US as being an ally of Israel. So they now look to Moscow to redress the balance. Moscow is in fact again a factor in the Middle East. Its influence, exercised through Syria, amounts to a veto on any long-term arrangement for Lebanon.
And that in turn means that the only way President Reagan can be sure of getting the Marines safely home before election day is by recognizing that Syria has a vital interest in the future of Lebanon and that Moscow is backing Syria in the assertion of those interests.
And that in turn makes it all the more interesting that this week Soviet President Yuri Andropov delivered a cautious but diplomatically correct response to President Reagan's invitation of Jan. 16 to a ''dialogue'' aimed at establishing a ''constructive working relationship'' between Moscow and Washington. Mr. Andropov made Moscow appear to be as interested in relaxation of tension as President Reagan is.
But in the Middle East, the story is otherwise. Moscow can no longer be ignored in negotiations aimed at stabilizing Lebanon and thus clearing the way for a safe and ''successful'' return of the US Marines.
No high government official in either Moscow or Washington has yet suggested that the Middle East might well be the first subject for the new ''dialogue.'' But former President Richard Nixon had interesting things to say in an interview published in the current issue of U.S. News & World Report. He says that ''the time is ripe for a new relationship . . . of hardheaded detente'' between Moscow and Washington.
This week Moscow, belatedly, seemed to grasp the idea that President Reagan may actually have signaled the time for talking in his Jan. 16 speech. And this week it was plain that the road to stability in Lebanon may well have to lead through Moscow.