Secretary of State Cyrus Vance left the Middle East saying he is greatly encouraged that Israel and Egypt, despite continuing differences, seem committed to friendly relations that eventually will bring greater stability to the troubled region.

After taking part in Sunday's peace ceremonies on both sides of the Egyptian-Israeli border, the normally undermonstrative Vance emotionally told reporters it had been "one of the most moving days of my life."

In a chat with reporters while flying from Israel to Rome, Vance talked repeatedly about how he had seen in the faces of crowds of Egyptians and Israelis "an unmistakable referendum for peace."

"The outpouring of affection was so genuine. It moved me immensely," he said and added that the day's events, more than anything since the signing of the Egyptian-Israeli peace treaty March 26, caused him to believe, "We've really started a new era in the Middle East."

Senior U.S. officials traveling with Vance added that he is under no illusions about the enormously difficult obstacles to be overcome before the treaty can be expanded to a comprehensive peace settlement between Israel and the rest of the Arab world.

These obstacles were clearly evident Friday when Vance went to the Israeli city of Beersheba for the opening of the next round in the U.S.-mediated peace talks - those aimed at negotiating autonomy for the 1.4 million Palestinian inhabitants of the Israeli-occupied West Bank and Gaza Strip.

There, hard-line opening positions of both sides and procedural squabbles underscored that mutual suspicion and a capacity to grate on each other are still evident in Egyptian-Israeli relations. The Beersheba meeting seemed to leave everyone involved convinced that the one-year target date for reaching an agreement on Palestinian autonomy is going to be very difficult to meet.

U.S. officials said Vance came away more convinced than ever that a lot of preliminary technical work is needed and that it would be unrealistic to expect any dramatic signs of movement in the talks for several months.

Still, the officials said, the over-all impression received by Vance during his four days in the Middle East was that the desire for peace in Egypt and Israel remains so strong that it cannot be ignored by either government and must be considered a force with major potential to force both sides into accommodations on the autonomy issue.

The officials said Vance's optimism also was buoyed considerably by his discussions, individually and collectively, with Israeli Prime Minister Menachem Began and Egyptian President Anwar Sadat.

Vance came away with an impression that the two leaders, whose relationship frequently has been strained, finally have started to become closer, more harmonious and more understanding of each other.

This same growing sense of rapport, the officials added, has trickled from the two leaders to their key ministers and has improved their ability to work together in implementing specifics of the peace accord.

Reinforcing this pressure are what U.S. officials call "confidence-building measures" outside the framework of the West Bank and Gaza talks.

In their meetings Sunday in Beersheba and El Arish - a Sinai Peninsula town returned to Egyptian control after 12 years of Israeli occupation - Begin and Sadat announced the opening of their borders, the release of a number of Arabs imprisoned in Israel and a scheduled visit by Begin to Egypt in July.

In the view of U.S. officials, these steps, plus others to come later, will have the effect of making the peace treaty seem more real to the Egyptian and Israeli people and strengthen their mutual desire that it endure.

For that reason, the officials said, Vance is optimistic that the enthusiasm for peace will influence the autonomy talks. His talks with Begin and Sadat, they added, made him believe that both leaders feel the same way and already are moving carefully to find ways to deal with the toughest issues.

Specifically, the officials said, they think Sadat and Begin will try harder to tone down their public rhetoric and their past tendency to negotiate in the newspapers. According to the officials, they also seem to have agreed that the first task of their negotiating team should be to isolate the most difficult problems, to seek joint definitions of what they involve and to decide on how they want to approach the necessary solutions.

Because of hostility directed against Sadat by the rest of the Arab world, the Carter administration is particularly eager to have the negotiations quickly project a serious attitude and a sense that they offer a genuine hope of solving the Palestinian problem.

But the officials said Vance was pleased to find that Sadat agrees the talks probably will move slowly, despite pressures on him for results that will heal the breach with his traditional Arab allies. They described Sadat as confident he has the support of his people and his armed forces and, although troubled by the enmity of other Arab countries, convinced that the tensions will prove transitory. A14