During its 500-year duration, Joseon encouraged the entrenchment of Confucian ideals and doctrines in Korean society. Neo-Confucianism was installed as the new state's ideology. Buddhism was accordingly discouraged and occasionally faced persecutions. Joseon consolidated its effective rule over the territory of current Korea and saw the height of classical Korean culture, trade, literature, and science and technology. In the 1590s, the kingdom was severely weakened due to Japanese invasions. Several decades later, Joseon was invaded by the Later Jin dynasty and the Qing dynasty in 1627 and 1636–1637 respectively, leading to an increasingly harsh isolationist policy, for which the country became known as the "hermit kingdom" in Western literature. After the end of these invasions from Manchuria, Joseon experienced a nearly 200-year period of peace and prosperity, along with cultural and technological development. However, whatever power that the kingdom recovered during its isolation waned as the 18th century came to a close. Faced with internal strife, power struggles, international pressure, and rebellions at home, the Joseon kingdom declined rapidly in the late 19th century.