Raja Bongsu, or Raja Yusuf, was the brother of Sultan Mukaddam Shah, the 6th Sultan of Perak. Raja Bongsu was captured along with Sultan Mukaddam in 1619 by the invading Achehnese in Perak. Raja Bongsu remained in Acheh until 1627 when Sultan Iskandar Muda Mahkota Alam of Acheh decided to install him as the 8th Sultan of Perak replacing Sultan Mansur Shah II, and he was styled Sultan Mahmud Shah.
Sultan Mahmud Shah resided at Geronggong (now known as Kampung Jawa in the Pulau Tiga of Perak Tengah district). After a short reign of 3 years, Sultan Mahmud Shah mangkat and was interred at Kampung Tok Melor but his makam has since been eroded by the Perak River. His makam was later relocated to its present location at Kampung Pulau Tiga near the same location as for the makam of the 14th Sultan of Perak, Sultan Muhammad Shah.
The title Marhum Pulau Tiga was conferred on him posthumously.