You have to take in account that all of our sources are filtered by three generations of Aladins dinasty propaganda and totalitarism. According to foreing historians the Sultans had troubles with social discontent before Alladdins apearance. Food shortages and militar reprehension were comon description on those times. But also opulenc3 by the sultans as big palaces and privete exoctic animal zoos. Feeding a tiguer could use the meats necesary for twelve srarving homeless people. The sultan and his best man Jafar made a plan to create a new type of monarchy that would win social aceptance among discontent population by a facade of "peoples goverment" while at the same time maintaining the sultan privileges. The myth of Aladdin, the common boy who by magical means and a good heart, marries the princess and becomes sultan. The problem arrived when princess Jazmin found out of his father treachery to used her and marry an uneducated boy. They finally agreed that they will find a situable prince that would pose as a street dweller for some time and then marry the princess. Prince Ali was found from a good ascendence but bankrup enough to follow the sultans plans. We know thi history because Jafar was exiliated as soon as Prince Ali was found since therw was a personal feud between Jafar and Ali clans involving the legancy of a incense lamp from a common ancestor. As for Jafar accounts we know that the lamp was especially design to be used with blue basil from India and other undentified spice, that mixed together produced vivid alucinations. We know that addiction to blue basil finally undermined the Alladins rule after the third generation (Aladdin was still alive at that time but abdicated in favor of his son Abu because of his alucinations and addiction to blue basil and supposedly discovery of a new world in his alucinations.) . To answer your questions. There was not a new kingdom or ruler in Agrabha, there was only a broke prince Ali who created a the myth of Alladin to appeal to popular masses but finally abdicate because of blue basil allucinogens.