His father was Tun Ali, Bendahara Siwa Raja, and his mother was Encik Wan Ngah of the Bendahara family.[1] He was privately educated as was the custom of the nobility then. In 1832, he was proclaimed as Bendahara Muda (Bendahara in waiting) in a ceremony in Lingga, then capital of the Johor empire. He had three wives: Tengku Kechik, daughter of Sultan Abdul Rahman of Johor; Tengku Chik, daughter of Sultan Ahmad Tajuddin II of Kedah; and Tengku Chik, daughter of Sultan Muhammad of Johor.[2]