century, as the social system of Joseon was beginning to collapse: the rebellion of Hong Gyeong-nae in the northern provinces in 1811, the Imo Incident of 1882, and the Donghak uprising of 1894–1895. Occasional rebellions also took place among the country's small ethnic minorities. The Tungusic tribes of the northeast rose in 1583 under Nitanggae and seized a number of towns; they were put down by the general Sin Rip. Thereafter markets were established in the region to help supply the tribesmen with needed goods. In 1510, Japanese merchants and settlers had risen in rebellion against a local commander; this was followed by the expulsion of all Japanese and the closure of the ports for two years. After the Seven Year War, Japanese access to the country was sharply constrained, and such incidents ceased to occur. Diplomacy Joseon's international relations implemented Korean Neo-Confucian ideal of "serving the great" (sadae) to Chinese Ming dynasty and later Manchu Qing dynasty. On a lower level, the country maintained ties with various neighboring nations, including the Jurchen tribes of the north and the Japanese and Ryūkyū states across the sea. To this end, interpreting schools were set up in the capital and in border towns such as Jeju and Busan. The Joseon dynasty endured two major invasions prior to its progressive loss of sovereignty in the late 19th century. These were the Seven-Year War, a two-stage Japanese invasion led by Toyotomi Hideyoshi in the 1590s, and the First and Second Manchu invasions in the early 17th century. Although the Japanese were ultimately repelled, Joseon was compelled to surrender to the Manchus, who later became the Qing dynasty. After the Treaty of Ganghwa and the opening of the ports in 1876, the diplomatic approach changed, and the government of Joseon began to enter into diplomatic relations with both neighboring and European countries. Treaties of Joseon dynasty Before 1875 After 1875 * Unequal treaty See also Korean Confucianism History of Korea Political factions in Joseon dynasty Notes Korean Confucianism Joseon dynasty