Emperor Kangxi was the fourth emperor of the Qing Dynasty and ruled from 1661 to 1722. His administration of 61 years makes him the longest-reigning Chinese emperor in history, and many scholars claim he was one of the greatest. In the early decades of Kangxi's reign, Jesuits played a large role in the Imperial Court. With their knowledge of astronomy, they ran the Imperial Observatory. Two Jesuits also facilitated the first treaty that China was to sign with a foreign power (Russia) the Treaty of Nerchinsk. This was a remarkable achievement which fixed the borders between the two countries. Fathers Jean-François Gerbillon and Thomas Pereira served as translators for the crucial negotiations.
Kangxi was grateful to the Jesuits for their contributions, the many languages they could interpret and the technical innovations they offered his military. Kangxi was also fond of the Jesuits' respectful and unobtrusive manner; they spoke the Chinese language well and wore the silk robes of the elite. Because of this good relationship, in 1692, when Fr. Pereira requested tolerance for Christianity, Kangxi was willing to oblige. He issued the Edict of Toleration, which recognized Catholicism, barred attacks on churches, and legalized their missions and the practice of Christianity by the Chinese people.
This is an extract from the Edict
The Europeans are very quiet; they do not excite any disturbances in the provinces, they do no harm to anyone, they commit no crimes, and their doctrine has nothing in common with that of the false sects in the empire, nor has it any tendency to excite sedition . . . We decide therefore that all temples dedicated to the Lord of heaven, in whatever place they may be found, ought to be preserved, and that it may be permitted to all who wish to worship this God to enter these temples, offer him incense, and perform the ceremonies practised according to ancient custom by the Christians. Therefore let no one henceforth offer them any opposition.