Ahmed Lütfullah (early 17th century – 27 February 1702), better known by his court title of Münejjim Bashi (Turkish: Müneccimbaşı; "Chief Astrologer"), was an Ottoman courtier, scholar, Sufi poet and historian. His chief work is the Jamiʿ al-Duwal, a world history particularly valuable for the history of the medieval Muslim dynasties of the regions around the southwestern shore of the Caspian Sea (Adharbayjan, Shirvan, Arran, Derbent). In Turkish literature, he is referred to also as Ahmed Lütfullah.
His father Lütfullah was a native of Ereğli, Konya, but Ahmed was born in Salonica sometime in the first half of the 17th century (in 1631 according to the Encyclopædia Britannica). He was educated at the Mevlevi dervish lodge in the quarter of Kasımpaşa, spending 15 years there under the supervision of Sheikh Halil Dede. After studies on astronomy and astrology, he advanced to the position of chief court astrologer (müneccimbaşi) in 1667/8. He enjoyed his greatest prominence under Sultan Mehmed IV (reigned 1648–87), who in 1675/6 raised him to the rank of musahib-i padishahi ("imperial companion"), signifying his admittance to the innermost circle of the court. He retained the post until Mehmed IV's deposition in November 1687, when he was exiled to Egypt, where his adopted son Moralı Hasan Pasha served as governor. After some time he moved to Mecca, where he became the sheikh of the local Mevlevi lodge. In 1693/4 he moved to Medina for seven years. In 1700, he was recalled to Istanbul to work again as chief astrologer, but declined the offer because of his old age. He returned to Mecca, where he died on 27 February 1702. His tomb was located near the mausoleum of Khadija, the first wife of Muhammad.