I am not entirely sure about the idea that Morocco happens to be in Africa rather than the Middle East.
Egypt is also an African country from a geographic point of view and certainly it was involved in the vast majority of Arab military efforts against Israel over the years until it signed its famous peace agreement with the Jewish State in 1979.
Libya also happens to be in Africa geographically and I do not think for a minute that anyone would describe Col. Qaddafi as a non-player in the Middle East or on the Arab-Israeli arena, nor would anyone claim that the good old Colonel has never done or tried to do things designed to make the Israelis ( and others ) go absolutely mad !
The fact of the matter is all these states are BOTH
IN AFRICA
AND THE MIDDLE EAST, and they all view themselves as players on the field, all be it in different ways.
Morocco , for example , took an active part alongside Egypt and Syria in the October ( Yom Kippur ) War of 1973. But just like Egypt, and very much unlike Syria, Morocco decided a long time ago to follow a path of peace and re-conciliation with Israel, and they have indeed enjoyed a very long and mutually-beneficial cooperation with the Jewish State for a very long time now, even though a lot of that relationship has remained rather discreet for obvious reasons.
And it would be interesting to point out that Morocco is far from unique in this. Many other Arab states have followed exactly the same path for years if not even decades. One could only mention countries such as Jordan, Tunisia, Mauritania, Yemen, UAE, Qatar, Bahrain, Oman and even Saudi Arabia !! The magic word in most of these situations was indeed DISCRETION, not to say SECRECY.
One can only imagine if even Syria might have such a secret "affair" with Israel which no one has managed to uncover yet.