After the fall of the Western Roman Empire , the region emerged as a cosmopolitan trading center , and was a collection of smaller duchies and states ( such as Flanders and Brabant ) , before modern history saw control of the region pass between France , the Netherlands and ( to a lesser extent ) Spain .