It is believed that Nanjing was the largest city in the world from 1358 to 1425 with a population of 487,000 in 1400. Nanjing remained the capital of the Ming Empire until <answer>1421</answer>, when the third emperor of the Ming dynasty, the Yongle Emperor, relocated the capital to Beijing.
When did Nanjing cease to be the capital?
1421