 The inhabitants of Kedah found him to be a valiant and intelligent person, and they made him the king of Kedah.In 634 CE, a new kingdom was formed in Kedah consisting of Persian royalty and native Malay of Hindu faith, the capital was Langkasuka.Based on the account given in "Hikayat Merong Mahawangsa" (also known as the "Kedah Annals"), the Sultanate of Kedah when King Phra Ong Mahawangsa converted to Islam and adopted the name Sultan Mudzafar Shah.