The Jingnan campaign, or Jingnan rebellion, was a three-year civil war from 1399 to 1402 in the early years of the Ming dynasty of China. It occurred between two descendants of the Ming dynasty's founder Zhu Yuanzhang: his grandson Zhu Yunwen by his first son, and Zhu Yuanzhang's fourth son Zhu Di, Prince of Yan. Though Zhu Yunwen had been the chosen crown prince of Zhu Yuanzhang and been made emperor upon the death of his grandfather in 1398, friction began immediately after Yuanzhang's death. Zhu Yunwen began arresting Zhu Yuanzhang's other sons immediately, seeking to decrease their threat. But within a year open military conflict began, and the war continued until the forces of the Prince of Yan captured the imperial capital Nanjing. The fall of Nanjing was followed by the demise of Zhu Yunwen, the Jianwen Emperor and Zhu Di was thus crowned the Ming Dynasty's third emperor, the Yongle Emperor.