Taungoo was founded in 1279 in the waning days of Pagan as part of frontier expansion southwards. After the fall of Pagan Empire in 1287, Taungoo came under the rule of Myinsaing Kingdom and later Pinya Kingdom. In 1358, Taungoo successfully revolted and became independent until 1367 when it became a nominal part of the Ava Kingdom. Its rulers retained a large degree of autonomy, playing larger Ava and Hanthawaddy kingdoms against each other. In 1470, Ava put down another rebellion and made Sithu Kyawhtin, the general who defeated the rebellion, governor. Sithu Kyawhtin's grandson Mingyi Nyo became governor of Taungoo in 1485. Under Mingyi Nyo's leadership, the principality grew powerful. In October 1510, Mingyi Nyo formally broke away from Ava and founded the Taungoo Kingdom.