Pyongyang, one Korea's oldest cities, was considered an important defense site during the Koryŏ dynasty, but did not develop significantly until the Chosŏn dynasty in the seventeenth century. This was partly because of its border location and unsuitability for farming but most of all because of discrimination by the central government. After the eighteenth century, however, Pyongyang led in the social development of Chosŏn. With stability in the relationship with Qing China, the area was free from the threat of war. The accumulated money and grains were used to entertain foreign diplomats and prepare for war while also providing commercial capital. The fact that the traditional ruling order and ideology were not strong was an advantage for the development of commerce. On the other hand, the government tried to induce Pyongyang's development within the system, as by, for example, holding a special civil service examination and recruiting members for the Royal Guard. During that time, Pyongyang progressed and continued to develop as the new urban cultural center of the region.