In the late 19th century, East Asia was integrated into the Euro-centric modern world. As part of this process, the spatial structure of domestic/foreign in East Asia shifted from the hua/yi system to the nation-state system, which demarcates independent states by clear borders.
The transition most affected the Ryūkyū Kingdom. The Ryūkyū Kingdom had been a tributary state of China since the 14th century. Although the Edo bakufu, the government of the Tokugawa Shogunate, recognized the Ryūkyū Kingdom's subordination to the Shimazu Domain, it did not consider the Ryūkyū Islands to be an integral part of its territory. Early modern Japan had an isolationist policy and never felt an urgent need to clarify the borders between Japan and its neighboring countries.
However, the international climate compelled the newly established Meiji government to reconsider the status of the Ryūkyū Kingdom. Though the region had been dominated by a Sinocentric world order for centuries, it eventually yielded to pressure from the Western powers to adopt the nation-state system. Accordingly, the Meiji government decided to end the Ryūkyū Kingdom's tributary relationship with Qing China and formally annex it to Japan in 1879. Even though the Ryūkyū Islands were incorporated into the Japanese nation, today these acts are considered the first step in Japanese imperial expansion.
The Japanese annexation of the Ryūkyū Islands soured Sino-Japanese relations. Moreover, the shizoku (the former ruling class) were indignant at the sudden change and tried to restore the previous regime by getting support from the Qing government. Hence, while the Japanese government made a good effort to prevent conflict with China, a great part of existing Ryūkyū systems and institutions were preserved so as to smooth over opposition from the shizoku. The Ryūkyū Islands were placed in a liminal position until after the Japanese victory in the Sino-Japanese War (1894-1895).