The Minangkabaus were the first migrant community to the state of Negeri Sembilan in the 14th century. They eventually populated the state and began to control local politics.
Before the Minangkabaus, the area was ruled by the Sultan of Malacca. After Malacca was defeated by the Portuguese, it was ruled by the Sultanate of Johor. By 1760, Johor, which was having trouble from the Dutch, allowed the state to appoint a raja, or sultan, from Minangkabau in Sumatra.
Between 1760 and 1770, a council of leaders known as the datuk-datuk penghulu luak (the predecessor of the datuk-datuk undang today) left for Pagar Ruyung in Minangkabau in search of a leader. The Raja of Pagar Ruyong, who was believed to be a descendant of Alexander the Great, gave them a leader in the form of his son, Raja Mahmud. Raja Mahmud later became known as Raja Melewar in Negri Sembilan.
Before Raja Melewar left for the Malay Peninsula, a royalty named Raja Khatib was sent to Negeri Sembilan to oversee Raja Melewar's coronation preparations. However, upon his arrival to Negeri Sembilan, Raja Khatib lied to the locals and claimed to be the prince sent from Pagar Ruyung. The locals believed him, and Raja Khatib was deemed the new king.
As for Raja Melewar, he first sailed to Johor to ask for the Sultan of Johor's consent to rule over Negeri Sembilan. The sultan did not object and conferred upon Raja Melewar the authority to reign over Negeri Sembilan. Raja Melewar's expedition marched to Negeri Sembilan through Naning.
At Naning, Raja Melewar's forces met Bugis warchief Daeng Kemboja. War ensued, but the Bugis forces were defeated.
Upon his arrival to Negeri Sembilan in 1773, Raja Melewar was deemed king and proclaimed as Yamtuan Besar in Kampung Penajis in Rembau. Raja Melewar learned of Raja Khatib's scheme and, becoming the undisputed ruler of the state, declared war against Raja Khatib.
Raja Melewar later relocated his palace to Seri Menanti, which remains the royal town of Negeri Sembilan today.
Following Raja Melewar's death in 1795, rather than selecting his son as their new leader, the datuk-datuk penghulu luak once again journeyed to their ancestral land. The Raja of Pagar Ruyong gave another son, Raja Hitam, to serve as their new Yam Tuan. Raja Hitam married Raja Melewar's daughter, Tengku Aishah, but they did not have children.
Selecting a ruler of Negeri Sembilan by a council of ruling chiefs in the state, or the datuk-datuk undang, became an implemented system. Under which, the person selected assumes the position of Yang di-Pertuan Besar, or Yamtuan Besar, a post that began in 1773.
- Information from Warisan Diraja Negri Sembilan Darul Khusus
Yang di-Pertuan Besar of Negeri Sembilan