King Hassan II of Morocco is a past master of diplomatic coups, with a history of encouraging contacts between Arabs and Israel.

Perched at the strategic western end of the Mediterranean, thousands of miles from the Arab-Israeli front lines, Hassan has made up in tenacity what he lacked in obvious diplomatic leverage.

For most of two decades, a succession of Israeli leaders has come to Morocco for private talks with the king.

Hassan arranged the crucial meeting between Israel's then-foreign minister Moshe Dayan and Egyptian vice premier Hassan Tuhami in 1977 that led directly to Anwar Sadat's visit to Jerusalem that November.

But while maintaining impeccable credentials with the rest of the Arab world, Hassan increasingly has turned to Moroccan Jews abroad to help improve his relations with Israel, the United States and other western powers.

In May 1984, he incurred Syrian ire by hosting a conference of Moroccan Jews, including Israeli ministers, politicians, intellectuals and just plain nostalgia seekers.

He repeated the exercise last May, much to the delight of the 150,000 Moroccan Jews living in Israel, the influential rump community of 16,000 still here and the approximately 100,000 others living in France, the United States and Canada. The powerful Israeli lobby in the United States has never flexed its muscles in Congress to oppose aid to Morocco.

Increasingly over his quarter-century reign as virtually undisputed master of Morocco, Hassan, 57, has launched personal diplomatic initiatives the way other leaders inaugurate public works projects.

In the 1970s at western behest he twice dispatched troops to Zaire to help fight Angola-based invaders.

But two years ago his conclusion of a treaty of union with Libya soured a once-close relationship with the Reagan administration. His role in promoting the meeting with Peres is expected by western diplomats to go a long way toward erasing remaining doubts about that move.