Medieval Kleve grew together from four parts – the Schwanenburg Castle, the village below the castle, the first city of Kleve on Heideberg Hill, and the "Neustadt" ("New City"), dating from the 14th century. In 1242 Kleve received city rights. The Duchy of Cleves, which roughly covered today's districts of Kleve, Wesel and Duisburg, was united with the Duchy of Mark in 1368, was made a duchy itself in 1417, then united with the neighboring duchies of Jülich and Berg in 1521, when John III, Duke of Cleves, married Mary, heiress of Jülich-Berg-Ravenburg.