 Since before the Heian period, the area was dominated by fishermen and sailors who played an important role in defending Japan against pirates and Mongolian invasions.After the Battle of Sekigahara, the Tokugawa "shōgun" gave the area to his allies, including Katō Yoshiaki who built Matsuyama Castle, forming the basis for the modern city of Matsuyama.The name Ehime comes from the "kuniumi" part of the "Kojiki" where Iyo Province is mythologically named Ehime, "lovely princess".