The emergency contact number in Morocco is 19.
Morocco is wonderful place, but it is still a 3rd world country in many ways. I suggest you avoid contact with the local police in Morocco as much as possible.
Local people avoid to call them at all. The police usually are slow to repond even if it is life threatening. When they do respond, they will always inestigate the victim of a crime before they look for the criminal. As for an ambulance, that is a joke. They have no medical training, no medical supplies, and they are always slow to arrive in an emergency situation.
Example: I live by a major intersection of the city. I have watched motorcycle /auto traffic accidents happen near my apartment often. Usually the the family of a victim arrive first, if medical help is needed that person transports the victim or even the other party to the accident transports the victim in a private car. Once I observed a major accident where the ambulances took over 40 minutes to arrive then one driver refused to put a victim in the bus because he was sure the man was going to die. my husband heard the driver say to bystander he didn't want to clean the mess from the vehicle. The driver stood next to the victim for over 30 minutes until he did die to prove his point. The police arrived about 20 minutes after that man died and did nothing to the ambulance driver but dismiss him from the scene. Even if that victim had made it to a public hospital, very little would have been done to save him. We took a friend to one once. Public Hospital in Morocco are houses of horror. They have little to no medication and at best are poorly equipped with even broken tools and filthy reused bedding and supplies. My husband and our friend saw a poor man who had been severely injured left to die in a corner of a hallway without even a blanket as staff just walked arround him. If you need medical care, take yourself to a private clinic. Know where they are in your area. I know there is one near my home. Their equipment maybe somewhat out dated, but at least it is clean.
As for passports
Unless you are traveling in Morocco for a very short time I advise you never to carry your passport with you on the street. It is too valuable. Like in most places throughout the world, there are thieves and pick-pockets hunting treasure such as cell phones, wallets, and even valid passports in places where people tend to gather in large groups. It can be gone without you even being aware it has happened. I have lived in Morocco for several years with no problem. However, during that time both my husband, a local tourist transporter, and his father (at different times and places) both lost phones to this kind of thing.....so it can happen to locals too.
Securely fassen your hand bags and loop them around your body if possible. Instead of carring your actual pass port, carry a certified copy of it. Even the police have accepted mine for a routine ID check.
Exception: unless you know you are going to be in a situation where you will be required use the chip in it as a verification....such as at your consulate, a local government office, or at a boarder crossing
To get a certified copy, take your passport and a photocopy or a printout of your PDF to the municipal administration building in the area where you live (before traveling everyone should have already emailed himself and another person a PDF of his ID along with his itinerary anyway) and have that photocopy stamped as a certified copy of your ID. The stamp is officially good for 3 months, you can easily have it renewed, but for the most part you can continue to use that copy as ID for years for most situations in Morocco people don't actually need to see a passport they just need a picture ID....if you have a valid resistance card or drivers license (you can do the same with those too).
it is far easier and cheaper to replace that copy than your actual ID or pass port. This I learned while traveling in the USA years ago....long before I became an expat in Morocco.