As we get into the late Heian period, you start to have the emergence of a increasingly powerful warrior class. And all of that comes to a head in the year 1185 when the Heian period ends and a general by the name of Minamoto Yoritomo comes to power. And what's significant here is the notion of an emperor continues to exist, but all of the power resides in what you can essentially consider a military dictator or a shogun. And the system that emerges is known as the bakufu system or the shogunate. And Minamoto Yoritomo was the first shogun. So you can see here the emperor still was there, but the shogun was where all of the power was. And this is really the beginning of medieval Japan.