Its construction dates back to the 11th century and it was one of the first strongholds in Mazovia. The first stronghold was a circular sand structure enforced with a layer of timber logs. It was inhabited mainly by fishermen and craftsmen, whose activity had a major impact on the development of the stronghold and its eventual transformation into an important trading centre.
Between the 11th and the 13th century, the stronghold was burnt down three times and reconstructed twice.