Matsumae clan
The was a Japanese clan that was confirmed in the possession of the area around Matsumae, Hokkaidō as a march fief in 1590 by Toyotomi Hideyoshi, and charged with defending it, and by extension the whole of Japan, from the Ainu "barbarians" of the north. The clan, originally known as the Kakizaki clan (蠣崎氏), had settled in Kakizaki, Kawauchi, Mutsu on the Shimokita Peninsula. Claiming descent from the Takeda clan of Wakasa Province, the family later took the name Matsumae. In exchange for their service in defending the country, the Matsumae were made exempt from owing rice to  the shogunate in tribute, and from the "sankin-kōtai" system, under which most "daimyōs" (feudal lords of Edo period Japan) were required to spend half the year at Edo, while their families spent the entire year at Edo and were, essentially, held hostage to prevent rebellion. Relations with Russia and the Ainu. Due to their location, and their role as border defenders, the Matsumae were the first Japanese to negotiate with Russia in any way. They may well have been the first Japanese to meet Russians at all within Japanese territory. In 1778, a merchant from Yakutsk by the name  of Pavel Lebedev-Lastochkin arrived in Hokkaidō with a small expedition. He offered gifts and politely asked to trade. The Matsumae official tried to explain that he had no authority to agree to trade on behalf of the shōgun and suggested that the Russians come back the following year. The following September, the Russians did just that. According to some accounts, they had misinterpreted what had been said and expected to trade. Instead their gifts were returned to them, they were forbidden to return to the island, and they were advised that foreign trade was allowed only at Nagasaki, a  port on the southernmost of Japan's home islands. In 1779, a massive earthquake struck Hokkaidō, and a forty-two-foot tsunami lifted the Russian ship out of the sea, depositing it a quarter-mile inland. The merchant Lebedev then gave up on Hokkaidō. The Matsumae clan's fief had extensive contacts with the Ainu of Hokkaidō, and had exclusive rights to trade with the Ainu communities of the island and to guarantee the security of Japanese interests there. Relations between the Matsumae and the Ainu was sometimes hostile, demonstrating that their power was not absolute in the region. In  1669, what started as a fight for resources between rival Ainu clans developed into a rebellion against Matsumae control of the region. It lasted until 1672, when Shakushain's Revolt was finally put down. The last serious Ainu rebellion was the Menashi-Kunashir Rebellion in 1789. In 1790, Kakizaki Hakyō painted the "Ishū Retsuzō", a series of portraits of Ainu chiefs, in order to prove to the Japanese populace that the Matsumae were capable of controlling the northern borders and the Ainu. The 12 paintings of Ainu chiefs were displayed in 1791 in Kyoto. At roughly the same time, in  1789, a Finnish professor, Erik Laxmann, of the Russian Academy of Sciences, came across several Japanese castaways in Irkutsk. Like several other Japanese before them, they had been found in the Aleutians, off the coast of Alaska, by Russian sailors and had asked to be brought back to Japan. Like those before them, these castaways had been transported instead across Siberia on their way to St. Petersburg. Laxman saw their plight as an opportunity to work towards the opening of Japan, and suggested this to Catherine the Great, who agreed. In 1791, she appointed the professor's son, Lt. Adam  Laxman, to command a voyage to return these castaways to Japan, and to open discussions towards a trade agreement. The expedition reached Hokkaidō in October 1792, and found the Japanese surprisingly hospitable. The Russians were allowed to spend the winter, and documents about them were sent to the "bakufu" in Edo. However, Professor Laxman insisted on bringing the castaways to Edo, and said that he would sail there himself even against the Shōgun's wishes. The "bakufu" sent an envoy to the Matsumae, requesting that the Russians make their way to the town of Matsumae by land. Sensing a trap , the Russians refused, and they were eventually allowed to make port in Hakodate, escorted by a Japanese vessel. They were given a guest house near Matsumae Castle, and were, unusually, allowed to maintain their own customs: they did not deny their Christianity, remove their boots indoors or bow to the Shōgun's envoys. The Japanese envoys gave them three swords and a hundred bags of rice, but also informed them that the Shōgun's rules remained unchangeable: foreigners could trade only at Nagasaki, and only if they came unarmed. All other ships would be subject to seizure. Due to his  purposes in returning castaways, Laxman was granted a pardon in this instance, but he refused to relinquish the castaways until he was given something in writing answering his request for trade. The envoys returned three days later with a document restating the rules regarding trade at Nagasaki and the laws against the practice of Christianity in Tokugawa Japan. The Russians never did establish any regular system of trade at Nagasaki, and historians today still disagree as to whether the document given to Professor Laxman was an invitation to trade, or an evasive maneuver on the part of the shogunate. The  Russian expedition led by Adam Johann von Krusenstern and Nikolai Rezanov stayed for six months in the port of Nagasaki in 1804–1805, failing to establish diplomatic and trade relations with Japan. Since the Matsumae land was a march or borderland, the remainder of Hokkaidō, then called Ezo, essentially became an Ainu reservation. Although Japanese influence and control over the Ainu gradually grew stronger over the centuries, at that time they were mostly left to their own devices and the shogunate did not consider their lands to be Japanese territory. It was only during the Meiji Restoration in the late 19th  century that the march was dissolved and Hokkaidō was formally annexed, and renamed, by Japan. Matsumae Domain Lords. The fourteen daimyō of the Matsumae Domain before the abolition of the han system in 1871 were: