In order to maintain swift communication from one town or city to another, the Song laid out many miles of roadways and hundreds of bridges throughout rural China. They also maintained an efficient postal service nicknamed the "hot-foot relay", which featured thousands of postal officers managed by the central government. Postal clerks kept records of dispatches, and postal stations maintained a staff of cantonal officers who guarded mail delivery routes. After the Song period, the Yuan dynasty transformed the postal system into a more militarized organization, with couriers managed under controllers. This system persisted from the 14th century until the 19th century, when the telegraph and modern road-building were introduced to China from the West.