In deep distress Ali Juhari now sends all his people back to Chamtalira and himself enters on a series of objectless wanderings.
While thus engaged he meets in a garden in the midst of the wilderness a hermit, Dahét Amin, who imparts to him sundry useful
knowledge, gives him certain objects endowed with miraculous power and changes his name to Eseukanda (Achehnese form of Alexander) Ali.
Resuming his journey, he has soon reason to be thankful for these charms, which enable him to make a conquest of the giant Mala'öy Rimba on the plain of Indra Chahya. The latter had just returned to his forest haunt from Keureutóë, bringing with him from thence the dead body of a girl whom he had slain at a punishment for pelting him with stones. When the giant had discovered that Eseukanda Ali was his master in all magie arts, they became friends, and the giant told him as the latest news from Keureutóë, that the espousal of the princess to Sulóyman was on the eve of being celebrated.
They tlien consulted together as to how best to frustrate the marriage. Eseukanda Ali was to assume the form of the girl Siti Ubat who has been slain by the giant and thus disguised to go to her mistress the flower-seller Sami'un, and pretend to have been carried oft into the forest by a jen, but to have had the good luck to escape.
The strategem succeeds, and Eseukanda Ali, in the female form he has assumed, not only succeeds in meeting his beloved, but actually becomes her servant. Thus after secretly revealing to her his truc shape, he manages to escape with her upon the wedding-day.
Two pahlawans (warriors) pursue him, but lose their senses by Eseukanda Ali's magie art. Through a number of occurrences described in a luimorous vein, the lovers become separated from one another, and the princess barely succeeds in escaping from two assailants of her honour; one is a Kringgi sweet meat-seller, the other a one-legged man named Si Pantöng.
Disguised as a man she finally finds a resting-place in the kingdom of Tahtanun, whose king Ahmat was at that very time seeking a husband for his daughter Keumala Hayati; only he who could beat the Princess in a horse-race, was esteemed worthy to obtain her hand. Ra'na Jamin achieves this feat and weds the princess, whereupon her father-in-law hands over the throne to her.
This assumption of government by a woman in disguise is to be met with again in the tale of Qamar Az-zaman in the Thousand and One