Even into the ninth century, when the situation at the centre was less stable, it was a well-governed country with complex long-distance supply chains for food and raw materials, where life and property were protected by a code of law administered by trained local magistrates; one could travel the length and breadth of the land on reliable roads, or using the canal system, and always find a place to stay at night and a meal to eat, the administration providing service industries and security from bandits and violence.