According to tradition, Jan Stecki obtained the estate by winning it at cards in 1773. A small fortress once stood on its site. The ruins of the fortress were dismantled and the remains used as building material. In 1789 Stecki began building his palace on the remains of the old castle. Of the former fortress only the moats remain now. A Pole of Italian origin, Domenico Merlini, was hired as architect. He built the palace in his favourite style – Classicism. It was he who built the Łazienki Palace in Warsaw and restored Ujazdów Castle.