 Founded in 1708, it was incorporated into the newly founded Tongwen Guan in 1862.The Lifan Yuan was roughly a Qing version of Xuanzheng Yuan () or Bureau of Buddhist and Tibetan Affairs, instituted by the Mongol Yuan dynasty for administering affairs beyond the borders of China proper.It is to be distinguished from the Ministry of Rites, which was the traditional Chinese institution for dealing with all outsiders during the Ming dynasty.