The Sultans of Selangor are descended from a Bugis dynasty that claim descent from the rulers of Luwu in the southern part of Celebes (today known as Sulawesi). Nobles from this bloodline were involved in the dispute over the Johor-Riau Sultanate in the early 18th century, eventually placing their full support in the cause of Sultan Abdul Jalil of the Bendahara dynasty against the claimant to the Malaccan lineage, Raja Kechil. For this reason, the Bendahara rulers of Johor-Riau established close relations with the Bugis nobles, providing them with titles and control over many areas within the empire, including Selangor. Daeng Chelak's prince, Raja Lumu arrived in Selangor and founded a new government at Kuala Selangor in 1766. He was installed by the Sultan of Perak as Sultan Salehuddin Shah and became the first Sultan of Selangor.