Tun Habib Abdul Majid bin Tun Ali bin Tun Muhammad (1637 – 27 July 1697) was the 19thBendahara (the ancient Malay equivalent of a Grand Vizier) of the Johor Sultanate during the late 17th century. The Johor Sultanate under Sultan Mahmud Shah II (who belonged to the Malacca-Johor royal family) saw a gradual decline of royal authority during Tun Habib's tenure as the Bendahara of Johor. Internal challenges within the Sultanate faced by Tun Habib consolidated his power as the Bendahara, in which case the Bendahara monopolised legitimate authority over the Johor Sultanate by the 1690s. After his death, Tun Habib's descendants spanned throughout the Johor Sultanate and established ruling houses in Riau-Lingga, Johor, Pahang and Terengganu.
Little was known of Tun Habib's early life except that he was the son of the Maharaja Sri Diraja of Johor, and that he was jostling for power and recognition with his rival, Laksamana Tun Abdul Jamil during the reign of Sultan Abdul Jalil Shah III.
In 1677, Sultan Ibrahim Shah appointed Tun Habib as the Bendahara of Johor and was assumed the title of "Bendahara Seri Maharaja" the following year. Nevertheless, his authority was quickly overshadowed by the more powerful and experienced Laksamana (who assumed the title of Paduka Raja Laksamana), Tun Abdul Jamil. Tun Abdul Jamil, seeking the advantage of having an inexperienced Sultan, quickly established his power centre at Riau and overshadowed the Sultan's authority and proclaimed himself Regent. He stopped paying tributes to the Sultan even before Sultan Ibrahim Shah's death in 1685, and appointed filled the top ranks with his family members. Naturally, these appointments earned the wrath of many chiefs and top ministers, including Tun Habib himself. The Laksamana, unable to withhold the tremendous opposition from Tun Habib and his allies, fled to Terengganu in 1688 where he was shortly killed after that. Shortly after Tun Abdul Jamil's expulsion, Tun Habib went over to Riau and took the young ruler, Sultan Mahmud Shah II back to Johor.