About this sound Hokkaido (help·info) (北海道 Hokkaidō?, literally "Northern Sea Circuit"), formerly known as Ezo, Yezo, Yeso, or Yesso, is Japan's second largest island; it is also the largest and northernmost of Japan's 47 prefectures. The Tsugaru Strait separates Hokkaido from Honshu, although the two islands are connected by the underwater railway Seikan Tunnel. The largest city on Hokkaido is its capital, Sapporo, which is also its only ordinance-designated city.
Hokkaido was settled by Ainu, Nivkh, and Orok 20,000 years ago. The Nihon Shoki, finished in 720, is often said to be the first mention of Hokkaido in recorded history. According to the text, Abe no Hirafu led a large navy and army to northern areas from 658 to 660 and came into contact with the Mishihase and Emishi. One of the places Hirafu went to was called Watarishima (渡島), which is often believed to be present-day Hokkaido. However, many theories exist in relation to the details of this event, including the location of Watarishima and the common belief that the Emishi in Watarishima were the ancestors of the present-day Ainu people.
During the Nara and Heian periods (710–1185), people in Hokkaido conducted trade with Dewa Province, an outpost of the Japanese central government. From the medieval ages, the people in Hokkaido began to be called Ezo. Around the same time Hokkaido came to be called Ezochi (蝦夷地?) or Ezogashima. The Ezo mainly relied upon hunting and fishing and obtained rice and iron through trade with the Japanese.
During the Muromachi period (1336–1573), the Japanese created a settlement at the south of the Oshima Peninsula. As more people moved to the settlement to avoid battles, disputes arose between the Japanese and the Ainu. The disputes eventually developed into a war. Takeda Nobuhiro killed the Ainu leader, Koshamain, and defeated the opposition in 1457. Nobuhiro's descendants became the rulers of the Matsumae-han, which was granted exclusive trading rights with the Ainu in the Azuchi-Momoyama and Edo periods (1568–1868). The Matsumae family's economy relied upon trade with the Ainu. They held authority over the south of Ezochi until the end of the Edo period in 1868.
The Matsumae clan rule over the Ainu must be understood in the context of the expansion of the Japanese feudal state. Medieval military leaders in northern Honshū maintained only tenuous political and cultural ties to the imperial court and its proxies, the Kamakura Shogunate and Ashikaga Shogunate. Feudal strongmen sometimes located themselves within medieval institutional order, taking shogunal titles, while in other times they assumed titles that seemed to give them a non-Japanese identity. In fact many of the feudal strongmen were descended from Emishi military leaders who had been assimilated into Japanese society.
There were numerous revolts by the Ainu against feudal rule. The last large-scale resistance was Shakushain's Revolt in 1669–1672. In 1789 a smaller movement, the Menashi-Kunashir Rebellion, was also crushed. After that rebellion the terms "Japanese" and "Ainu" referred to clearly distinguished groups, and the Matsumae were unequivocally Japanese. In 1799–1821 and 1855–1858 the Edo Shogunate took direct control over Hokkaido in response to a perceived threat from Russia.
Leading up to the Meiji Restoration, the Tokugawa Shogunate realized there was a need to prepare northern defenses against a possible Russian invasion and took over control of most of Ezochi. The Shogunate made the plight of the Ainu slightly easier, but did not change the overall form of rule.