The foundations of the Kamakura shogunate can be traced to the complex political and social changes that had been transforming Japan since the late Heian period. The imperial court in Kyoto, while maintaining its cultural prestige and ceremonial functions, had gradually lost effective control over the provinces as local strongmen and warrior bands gained power and autonomy. The rise of the warrior class, or bushi, was closely connected to the development of private estates known as shoen, which had emerged as powerful landowners sought to avoid imperial taxation and regulation by placing their holdings under the protection of influential court nobles or religious institutions.