In 1646, Koxinga first led the Ming armies to resist the Manchu invaders and won the favour of the Longwu Emperor. The Longwu Emperor's reign in Fuzhou was brief, as Zheng Zhilong refused to support his plans for a counter-offensive against the rapidly expanding forces of the newly established Qing dynasty by the Manchus. Zheng Zhilong ordered the defending general of Xianxia Pass (), Shi Fu (a.k.a. Shi Tianfu, a relative of Shi Lang), to retreat to Fuzhou even when Qing armies approached Fujian. For this reason, the Qing army faced little resistance when it conquered the north of the pass. In September 1646, Qing armies broke through the inadequately defended mountain passes and entered Fujian. Zheng Zhilong retreated to his coastal fortress and the Longwu Emperor faced the Qing armies alone. Longwu's forces were destroyed; he was captured and was executed in October 1646.