Daimyo were landholding lords in feudal Japan between 900s and 1600 CE, during a period when the country was divided into several territories. The daimyo were also military leaders who commanded armies of samurai. During this feudal period, many wars broke out among the daimyo. Each lord lived in a castle and was eclipsed in rank only by a shogun or the emperor.
Daimyo rose to power after public landholding rights broke down in the 700s, and the nobles and religious classes consolidated their landholdings. When the number of regional armies grew during the 11th and 12th centuries, daimyo became authoritarian figures who controlled the lands surrounding their castles as well as taking authority over any armies living in proximity to those lands. In exchange for the use of land, the daimyo insisted upon supreme loyalty from their subjects.
The feudal lords were frequently at war with each other. These wars became more prominent from 1467 to 1573, otherwise known as the "Warring States" period of feudal Japan. One daimyo, Tokugawa Ieyasu, sought to end the feuds of the daimyo by consolidating power. Tokugawa defeated the last of his powerful enemies in 1600 with his victory at the Battle of Sekigahara.
In 1603, the emperor bestowed the rank of shogun on Tokugawa, and all remaining daimyo swore allegiance to him. The feudal period of Japan ended at this point. The Tokugawa shogunate lasted until 1868, when Japan modernized due to the influence of several foreign governments.