Hi Excess
That is a very nice Moroccan musket. And tastefully decoration in local fashion. Appears all of the decoration and inlays are intact. Rare to find one so complete. This style was known as Afedali, from the Taroudant Region, around the Oued Sous Valley. (A different variation is posted on another Thread in this Forum you can read about). The locally made snaphaunce lock on this gun copies the Dutch pattern. Looks like it could use a good rust bath and cleaning. Most of these guns that you find today will not hold in the cocked position due to their sear being worn down. Sometimes this can be adjusted, but usually it will require a spot of weld added to the sear toe and filed and re-shaped and then hardened if possible. A tedious job. It seems none of the lock makers had an understanding of heat treating. Their locks must have required constant maintenance and repair.
These guns were generally made using three different trade crafts. Stock making, barrel making, and lock building by three different shops. The more highly decorated stocks being done by the Jewish Nomad jewelers in the Region.
Your gun probably dates to the first half of the 19th Century. It's hard to believe these muskets were still being made and used through the 19th Century utilizing snaphaunce locks dating to the late 16th Century. But progress was very slow in that region of the world. Traditions die hard.
Again, a very nice example and would be worth cleaning and repairing the lock.
Rick