After the Second Peace of Thorn in 1466 it became a fief of the Kingdom of Poland.