Summoned by his uncle, Stanislaus II Augustus, and the Sejm when the Polish Army was reorganized, Poniatowski returned to Poland. The King had made previous arrangements with the Austrian authorities for this transfer, which in the end depended on his nephew's willingness to make the move. In October 1789, together with Tadeusz Kościuszko and three others, Poniatowski received the rank of major-general, and was appointed commander of a division in Ukraine and devoted himself to rebuilding the small, and long-time neglected, Polish–Lithuanian Commonwealth's army.