Chinese characters were introduced to Vietnam after the Han dynasty conquered the country in 111 BC. Independence was achieved in 938 AD, but Literary Chinese was adopted for official purposes in 1010.[20] For most of the period up to the early 20th century, formal writing was indistinguishable from contemporaneous classical Chinese works produced in China, Korea, and Japan.[21]