the capital to serve as acting prefect of Bei Prefecture (貝州, in modern Xingtai). Once Song got to Bei Prefecture, he further offended Wu Sansi—as he refused to have tax payments due Wu Sansi as his fief paid to Wu Sansi, citing that the region had just suffered a flood. He was moved to be the prefect of the more distant Hang Prefecture (杭州, roughly modern Hangzhou, Zhejiang), and later served as the prefect of Xiang Prefecture (相州, in modern Handan). It was said that he was clean but strict as a prefect, and his subordinates did not dare to be corrupt. During Emperor Shang's reign and Emperor Ruizong's second reign Emperor Zhongzong died suddenly in 710—a death that traditional historians believed to be a poisoning carried out by Empress Wei and her daughter Li Guo'er the Princess Anle, so that Empress Wei could become "emperor" like Wu Zetian and Li Guo'er could be crown princess. Meanwhile, though, Emperor Zhongzong's son by a concubine, Li Chongmao the Prince of Wen, was named emperor (as Emperor Shang), but Empress Wei retained power as empress dowager and regent. Song Jing was made the secretary general of Luo Prefecture (), which contained the eastern capital Luoyang. Less than a month later, Empress Dowager Wei and Li Guo'er were killed in a coup led by Emperor Zhongzong's sister Princess Taiping and nephew Li Longji the Prince of Linzi. Li Longji's father Li Dan the Prince of Dan, himself a former emperor, returned to the throne (as Emperor Ruizong). Emperor Ruizong made Song the minister of civil service affairs () and gave him the designation Tong Zhongshu Menxia Sanpin (), making him a chancellor de facto. After Li Longji was created crown prince, Song was also made a member of his staff. During Emperor Zhongzong's reign, the civil service affairs system was subject to great abuses by powerful individuals at court, particularly while the chancellors Cui Shi and Zheng Yin were in charge — as they were allowing bribes and pleas by powerful individuals to influence them, going as far as naming reserve officials two years in advance. Song and his deputies Li Ai () and Lu Chongyuan () reformed the system and put the civil service system back in order, at the same time that Song's fellow chancellor Yao Yuanzhi, who was then also minister of defense, put the military promotion system back in