The Magpie is an uncommon to common resident in Morocco and was known as Pica pica mauritanica (this subspecies restricted to Northwest Africa). The new World Checklist produces by Birdlife International (2016) upgrades its status to a full species : the Maghreb Magpie Pica mauritanica.
The Maghreb Magpie inhabits open woodland, e.g. Quercus ilex and Q. suber and matorral (Tetraclinis, Olea, Juniperus), especially with thorn bushes (Argania, Rhus, Crataegus), also clearings and edges of forest, riverine vegetation and in steppes with scattered bushes or trees (Acacia, Ziziphus, Euphorbia). It breeds from sea-level in Atlantic Morocco, though only above 350 m in Eastern Morocco, to 1900-2000 m in Middle and High Atlas, and sporadically up to 2400-2500 m in Central High Atlas.
It is absent from the extreme northwest, eg Tangier Peninsula, Rharb and High Rif, and locally rare in the northeast (Eastern Rif, east Prérif and Hills of Eastern Morocco). It is more widespread and locally common in Zemmour north to Mehdiya and the Mamora forest, throughout Zaër, Central Plateau and in Middle Atlas northeast to Jbel Tazekka and southwest to Beni-Mellal. It occurs locally in south Haouz between Marrakech-Chichaoua and the foothills of Western High Atlas. It is marginally more common on north side of Central High Atlas and on Jbel Ayachi in Eastern High Atlas, but more abundant on north and south sides of Western High Atlas and Haha, and locally northwards along the Atlantic coast as far as Chiadma (Essaouira area) and Abda (Safi area).
It is fairly common in Souss but more thinly distributed in Western Anti-Atlas, where it breeds mainly in coastal areas. Its southern limit is in Lower Draa (region of Goulimine).
BirdLife International 2016. Handbook of the Birds of the World and BirdLife International digital checklist of the birds of the world. Version 9. Available at: http://datazone.birdlife.org/userfiles/file/Species/Taxonomy/BirdLife_Checklist_Version_90.zip [.xls zipped 1 MB].
Thévenot, M. ; Vernon, R. & Bergier, P. 2003. The Birds of Morocco. British Ornithologists’ Union Check List. Tring, 20. 594 pp.