This relatively large compass and sundial, which is bigger than the palm of the hand, was used by the Muslim faithful to locate qibla, or the direction of Mecca for sholat (prayers). The sundial component was used for determining the time and thus the correct time for sholat.
It comprises an engraved brass hinged cover with a latch to one side, and on the inside, a magnetised needle, protected under glass which is held in place by a brass plate that has been engraved with concentric circles of zodiac and other motifs and a border of graduations. Included most probably are names of various Islamic cities.
The exterior base and the top cover are both engraved with motifs and inscriptions.
The sundial component is assisted by a folding deer-shaped gnomon (that part of a sundial that casts the shadow) and a swivelling pin.
Compasses such as these were produced in Iran in the latter half of the 19th century and into the early 20th century.
Related examples are illustrated in Maddison & Savage-Smith (1997, p. 274-5).
The example here is in fine condition. All is fully intact.
References
Maddison, F. & E. Savage-Smith, The Nasser D. Khalili Collection of Islamic Art: Science, Tools & Magic, Part One: Body and Spirit, Mapping the Universe, The Nour Foundation, 1997.