The Maghribi traders solved the problem by organizing themselves into a coalition that served as a grapevine for information on honest and dishonest agents. Any agents who treated a member unfairly could never hope to do business again with other members.
In Europe, in the eleventh and twelfth centuries, as more and more rural folk moved to towns and cities, a new class of merchants emerged to meet the demands of the growing urban population. It was during this period that the basic concepts and institutions of modern Western mercantile law (lex mercatoria) were formed.