The Nine Gates Infantry Commander (Chinese: 步軍統領/九門提督; pinyin: bùjūn tónglǐng/jiǔmén tídū) was a military appointment used in the Qing dynasty (1644–1912) of China. The officer holding this appointment was in charge of safeguarding and monitoring traffic, and overseeing the opening times of the nine gates of the imperial capital, Beijing. The nine gates were Zhengyang Gate, Chongwen Gate, Anding Gate, Fucheng Gate, Xizhi Gate, Dongzhi Gate, Xuanwu Gate, Desheng Gate, and Chaoyang Gate. The officer's judicial responsibilities included night patrol, fire fighting, security checks of civilians, the apprehension and arrest of criminals, and prison keeping. He was also responsible for the security of the Forbidden City. Throughout the history of the Qing dynasty, the position was always held by Manchus rather than Han Chinese.
The appointment was created in around 1644 when the forces of the Manchu-led Qing dynasty occupied Beijing, formerly the capital of the Ming dynasty, and established the Qing imperial capital there. The appointment holder's responsibilities were primarily to oversee the city's defences and security within the city. He was also in charge of the infantry units within the Eight Banners and the guards of the nine gates of Beijing. At the same time, he was also the commander of the north and south patrol units from the Green Standard Army. The infantry units were all stationed at specific locations within Beijing's inner city to defend that particular place. The patrol units maintained security in the outer city and strategic places in Beijing's outskirts.