History of Japanese nationality
The history of Japanese nationality as a chronology of evolving concepts and practices begins in the mid-nineteenth century, as Japan opened diplomatic relations with the west and a modern nation state was established through the Meiji Restoration. == Pre-modern Japan == Until the Meiji Restoration, Japanese people were subject to both the local authority of the daimyō and the national authority of the Tokugawa shogunate, who pledged allegiance to the Emperor.
Source: Wikipedia — History of Japanese nationality (CC BY-SA 4.0)