Raja Ahmad al Linggi adalah bersalasilah dari Tun Habib Abdul Majid. Artikel di bawah ini saya ambil dari wikipedia yang boleh dijejaki melalui URL ini : TUN HABIB ABDUL MAJID. Sejarah mengisahkan bahawa TUN HABIB ABDUL MAJID berketurunan Sayyid (keturunan dari RSAW) yang memakai gelaran Habib (menurut adat Acheh yang merupakan panggilan kepada keturunan ahlulbait). Bagaimanapun, keturunan beliau tidak lagi memakai gelaran Habib selepasnya di atas sebab-sebab yang menjadi rahsia (atas percaturan akhir zaman). Wallahualam.
Bagaimanapun, keluarga beliau di Muar iaitu dari keturunan Sayyid Jaafar, Dato' Pasir Diraja masih menggunakan gelaran Sayyid yang diwarisi dari moyang mereka iaitu Sayyid Abdullah al Aidrus, yang berkahwin dengan seorang puteri dari Acheh iaitu anak kepada Sultan Alauddin Mansyur Shah (1773-1786), yang bersalasilah dari Kesultanan Perak. (Sultan Alauddin ini ditawan ke Acheh semasa perang Acheh-Perak).
Hasil perkahwinan keturunan Al Aidrus ini dan puteri Acheh melahirkan seorang anak yang bernama Sayyid Zainal Abidin. Yang kemudiannya berkahwin dengan cucu kepada Tun Seri Lanang iaitu anak kepada Tun Jenal. Dari perkahwinan tersebutlah, melahirkan Tun Habib Abdul Majid, Sayyid Jaafar dan Puteri Bakal (berkahwin dengan Sultan Mahmud Shah II).
Tun Habib mempunyai beberapa orang anak lelaki dari beberapa isteri. Antara enam anak lelaki beliau ialah : Tun (Habib) Abdul Jalil, Tun Abdullah, Tun Abdul Jamal, Tun Mas Anum, Tun Zainal Abidin and Tun Mas Jiwa yang kesemuanya dilantik sebagai bendahara. Walaubagaimanapun, Tun Abdul Jalil and Tun Zainal Abidin kemudiaanya ditabalkan sebagai raja yang memerintah adlam kerajaan Johor-Riau dan Terengganu.
Raja Ahmad al Linggi adalah berketurunan dari Tun (Habib) Abdul Jalil yang ditabal menjadi Raja Johor Riau selepas kemangkatan Sultan Mahmud mangkat dijulang yang tidak berwaris.
Tun Habib Abdul Majid 1637–27 July 1697 was the 19th Bendahara the ancient Malay equivalent of a Grand Vizier of the Johor Sultanate during the late 16th 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.
Tun Habib's mother was of Malay ethnicity; while his father was of mixed ancestry. His great-grandfather, Sayyid Abdullah Al-Aidrus, was a Hadhrami Arab immigrant who settled in Aceh and married the daughter of Sultan Alauddin Mansyur Shah. Their son, Sayyid Zainal Abidin, migrated to Johor and married the granddaughter of Tun Sri Lanang by his son, Tun Jenal, the 5th Bendahara of Sekudai. It was from this union that the Maharaja Sri Diraja, the Dato Pasir Diraja (Sayyid Ja'afar) and Putri Bakal were born. Putri Bakal was believed to have later married Sultan Mahmud Shah II.
The name "Habib" was a local Achinese variant of the "Sayyid", an honorific title used by descendants of the Prophet Muhammad. However, in lieu of terse relations between Aceh with its neighbours in the 16th century, Tun Habib's name revealed his Acehnese heritage served to raise suspicions when it came to political matters. His descendants gave up the use of "Habib" in their names.
Tun Habib had several sons by different wives, all of whom rose to influential positions. He had at least six sons: Tun (Habib) Abdul Jalil, Tun Abdullah, Tun Abdul Jamal, Tun Mas Anum, Tun Zainal Abidin and Tun Mas Jiwa were all later appointed as Bendaharas. Among these sons, Tun Abdul Jalil and Tun Zainal Abidin later established their own independent ruling houses in Johor-Riau and Terengganu respectively.
* House of Bendahara, established by Sultan Abdul Jalil Riayat Shah IV which ruled Johor from 1699 until 1812 (albeit an interregnum between 1718 to 1722). In 1812, the death of Sultan Mahmud Shah III sparked a succession crisis between Tengku Abdul Rahman and his younger brother Tengku Hussein. The British, who came to the region in 1819 saw a royal house rivalled by succession dispute and took to task of recognising Sultan Hussein Shah as the Sultan of Johor and Singapore, while giving Tengku Abdul Rahman the title "Ruler of Singapore. The royal regalia was given to the Lingga-based Tengku Abdul Rahman who was supported by the Bugis nobles and Bendahara Ali of Pahang. The Anglo-Dutch Treaty of 1824 had the effect of splitting the royal household into two factions:
* House of Bendahara (Johor): Based in Johor, this branch was headed by Sultan Hussein Shah until his death in 1824, although the Temenggong wielded more actual authority than the Sultan, largely because of a lack of legitimate recognition among the Malay nobles. Hussein Shah's successor, Ali, while he managed to get hold of the royal seal to claim legitimacy to his rule, was quickly overshadowed by the more powerful Temenggong. Under British pressure, he was forced to cede soveriginity rights over Johor (except Muar) to Temenggong Daing Ibrahim in 1855. Sultan Ali died in 1877.
* House of Riau-Lingga: This branch was based in Lingga and headed by Sultan Abdul Rahman, who was supported by the Bugis nobles. He later died in 1832 and was succeeded by his son, Muhammad Shah and subsequently his grandson, Mahmud Muzaffar Shah in 1841. Sultan Mahmud Muzaffar Shah was deposed in 1857 by the Dutch, which was also supported by the Bugis nobles. In his later years, he began to claim recognition as the legitimate ruler of the Johor-Riau empire. This royal house lasted until 3 February 1911, when the Dutch assumed full control over Riau and Lingga.
* House of Temenggong (Johor), established by Temenggong Tun Daeng Ibrahim, a descendant of Sultan Abdul Jalil Riayat Shah IV by his non-royal son Tun Abbas. The present Sultan of Johor belongs to this royal house.
* House of Bendahara (Pahang): The current Sultan of Pahang traces his lineage to Sultan Wan Ahmad of Pahang, a descendant of Tun Abbas. (At one point of time another royal lineage that was related to the Malacca royal family (descended from Parameswara) also ruled Pahang, but later died out.
* The current Sultan of Terengganu is a descendant of Sultan Zainal Abidin I, the 5th and youngest son of Tun Habib.