Mahmud I was recognized as sultan by the mutineers as well as by court officials but for some weeks after his accession the empire was in the hands of the insurgents. Their chief, Patrona Halil, rode with the new sultan to the Mosque of Eyub where the ceremony of girding Mahmud I with the sword of Othman was performed; many of the chief officers were deposed and successors to them appointed at the dictation of the bold rebel who had served in the ranks of the Janissaries and who appeared before the sultan bare-legged and in his old uniform of a common soldier. A Greek butcher, named Yanaki, had formerly given credit to Patrona and had lent him money during the three days of the insurrection. Patrona showed his gratitude by compelling the Divan to make Yanaki Hospodar of Moldavia. However, Yanaki never took charge of this office.
The insolence of the rebel chiefs became at length insupportable. The Khan of the Crimea, whom they threatened to depose, was in Constantinople and with his assistance the Grand Vizier, the Mufti and the Aga of the Janissaries succeeded in freeing the government from its ignominious servitude. Patrona was killed in the sultan's presence after a Divan in which he had required that war should be declared against Russia. His Greek friend, Yanaki, and 7,000 of those who had supported him were also put to death. The jealousy which the officers of the Janissaries felt towards Patrona, and their readiness to aid in his destruction, facilitated greatly the exertions of Mahmud I's supporters in putting an end to the reign of rebellion after it had lasted for nearly two months.
Mahmud I entrusted government to his viziers and spent much of his time composing poetry.