 In the period 1037–1047 it was the capital of the independent, Mazovian state of Masław.Between 1079 and 1138 this city was "de facto" the capital of Poland.Since 1075 it has been the seat of the diocese encompassing northern Mazovia; the south formed the archdeaconate of Czersk belonging to Poznań, and the Duchy of Łowicz was part of the Gniezno archdiocese (this division remained as long as until the Partitions of Poland).