In 1179, after not serving in an official capacity since 1156, Zhu Xi was appointed Prefect of Nankang Military District (), where he revived White Deer Grotto Academy. and got demoted three years later for attacking the incompetency and corruption of some influential officials. There were several instances of receiving an appointment and subsequently being demoted. Upon dismissal from his last appointment, he was accused of numerous crimes and a petition was made for his execution. Much of this opposition was headed by Han Tuozhou, the Prime Minister, who was a political rival of Zhu's. Even though his teachings had been severely attacked by establishment figures, almost a thousand brave people attended his funeral. After the death of Han Tuozhou, Zhu's successor Zhen Dexiu, together with Wei Liaoweng, made Zhu's branch of Neo-Confucianism the dominant philosophy at the Song Court.