Prince Suvannamegha, son of King Sudassa, was expelled from the kingdom of Benares following intrigues perpetrated against him by a minor queen. He wandered in the jungle, accompanied by a golden-hair dog, and found refuge in a hermitage where he studied the arts and sciences before marrying Gandhamalā, the hermit's daughter. Later on, the minor queen's daughter was offered as food to a yakşa. The young prince. freed her and was placed on the throne of Benares by his father, King Sudassa.