King Hassan II, who ruled his North African domain with a firm hand for 38 years while earning respect abroad for his efforts to cultivate peace between Arabs and Israelis, was buried here today in a simple yet moving ceremony attended by President Clinton and a score of other world leaders.

In a fitting testament to Hassan's peacemaking role, Israeli Prime Minister Ehud Barak held an unprecedented meeting at the royal palace with Algeria's new president, Abdelaziz Bouteflika. The Israeli leader also joined Clinton and Palestinian leader Yasser Arafat for their first three-way conversation since Barak took office early this month with a pledge to achieve a comprehensive Middle East settlement within 15 months.

Israeli security adviser Danny Yatom described Barak's and Bouteflika's seven-minute discussion at the royal palace here as "a friendly and moving encounter" between two once implacable enemies. Bouteflika, who was elected in April and is striving to suppress a seven-year rebellion by Islamic radicals that has killed tens of thousands of people, said his country will support Barak's peace initiative even though it remains technically still at war with Israel.

"We attach high hopes on your peace plan," Bouteflika told Barak during the conversation, which was aired on Israeli television. "We are ready to contribute to [your efforts] whenever asked; we support peace."

"I promise you we will need it," Barak replied as the two men warmly clasped hands.

Clinton made no public statement on his conversation with Barak and Arafat, but following the funeral he told employees at the U.S. Embassy: "The opportunity for lasting peace is now at hand."

But the prospect of an impromptu leap forward in the Middle East peace process was averted when Syria's President Hafez Assad canceled plans to attend the funeral at the last moment. Moroccan officials said it was unclear if Assad's absence was related to health problems or reflected his reluctance to push too quickly for a comprehensive peace deal with Israel.

As tens of thousands of mourners gathered in the summer heat to pay final respects to the Arab world's longest-serving leader, Hassan's coffin was covered in a green Islamic shroud with gold Koranic markings. The casket was then borne slowly by an open army vehicle through the streets of the capital as security guards linked arms to hold back the teeming crowds.

Wearing a flowing white robe and red fez, Hassan's eldest son and successor, King Mohammed VI, 35, led the funeral cortege along with his younger brother, Crown Prince Moulay Rachid, and a throng of foreign dignitaries. The two-mile procession from the main palace, where Hassan's body had lain in state since Friday, when he died of a heart attack at age 70, ended at the royal mausoleum. There, after final prayers, the monarch was laid to rest next to his father, King Mohammed V, who became Morocco's first head of state after the country gained independence from France and Spain in 1956.

As the first U.S. president to visit Morocco since Dwight D. Eisenhower, Clinton acceded to a Moroccan request to join the new king in the vanguard of the funeral procession. White House national security adviser Samuel R. "Sandy" Berger said the security situation seemed "a little bit dicey" as police and security agents struggled to prevent mourners who were trying to touch the casket from jostling the leaders. As the cortege passed, people in the crowd chanted: "This is the hour of God."

The high level of U.S. representation, in which the president and first lady Hillary Rodham Clinton, were joined by former president George Bush and two former secretaries of state, James A. Baker III and Warren Christopher, reflected Hassan's longtime status as a valued American ally. Other leaders in attendance included French President Jacques Chirac, Jordanian King Abdullah, Egyptian President Hosni Mubarak and, from Israel, President Ezer Weizman and former prime minister Shimon Peres.

Berger said Clinton used the occasion to make personal contact with new leaders, including King Mohammed, and presidents Olusegun Obasanjo of Nigeria and Thabo Mbeki of South Africa. But in keeping with the spirit of Hassan's accomplishments, Berger said Clinton's discussions with Barak, Arafat and Mubarak focused mainly on how to expedite the stalled drive for a broader Middle East peace.

The prominence of the Israeli delegation also illustrated the special relationship between Hassan and the Jewish state that has taken root over the years, often in great secrecy. Agents of Israel's Mossad security service helped defend Hassan against his political enemies at home and reportedly shipped up to 100 tanks to assist Morocco in a border war with Algeria. In return, Hassan eased repression of Moroccan Jews and allowed many to emigrate to Israel, where they now constitute the largest Sephardic community, with more than 400,000 people.

U.S. special Middle East envoy Dennis Ross observed that by shattering the Arab taboo against contacts with Israel, Hassan opened the way for Egyptian leader Anwar Sadat's historic journey to Jerusalem in 1977 that would ultimately culminate in the Camp David peace agreement. He said the fact that Barak could attend Hassan's funeral and hold get-acquainted talks with other Arab leaders was a significant tribute to the Moroccan monarch's achievements.

"You did not see any barriers in that room," Ross said, describing the assembly of world leaders in the palace before the funeral march. "What would once have been considered a very abnormal setting seemed completely normal today."

As the youngest and most inexperienced leader in the Arab world, King Mohammed is not expected to assume his father's role as an important peace broker, at least for the time being. But Berger said that Hassan's heir assured Clinton that Morocco would remain faithful to its moderate traditions and do what is necessary to promote peaceful ties between Israel and the Arab world.