In the Ancient World, important early civilizations like Mesopotamia, Egypt, Greece, and Rome developed where the first laws were written and structures like the pyramids were built. During the Middle Ages, Germanic invasions occurred and feudal systems developed where society was divided into nobles, clergy, and common people. People moved from cities to rural countryside to become serfs of feudal lords until cities grew again in the 13th century.