The Ministry of Rites (simplified Chinese: 礼部; traditional Chinese: 禮部; pinyin: Lǐ Bù) was one of the Chinese Three Departments and Six Ministries which existed from the time of the Tang Dynasty (618-907 CE) until the Xinhai Revolution of 1911 brought an end to Imperial China. Prior to its formation, the tasks given to the Ministry were assigned to officials such as the Grand Herald. During the Song Dynasty (960-1279) its functions were temporarily transferred to the Imperial Secretariat.
Primary Functions 
- Management of state Confucian affairs including Imperial court ceremonies and ritual offerings.
- Certain matters relating to Buddhist and Taoist priests including their registration with the state.
- Management of the Imperial examinations.
- Foreign relations prior to the establishment of the Zongli Yamen in 1861.