After 31 years of reign, Sultan Muhammad died in late 1857 without appointing an heir. As a result, there was a huge dispute regarding who will succeed him as the Sultan of Selangor. His nephew, Raja Abdul Samad Raja Abdullah was finally chosen to be the next Sultan and he took on the title Sultan Abdul Samad.[15] He gave the power of authority of Klang to Raja Abdullah and Langat to Tunku Kudin of Kedah, both of whom were his sons-in-law, in 1866 and 1868 respectively.[2]