Malbork was a royal castle, the king's temporary residence, and the banner of the Kingdom of Poland flew over it, although daily, the king was represented at the castle by the starosta of Malbork (an elder administrator). The castle encompassed the adjacent lands, especially Żuławy (Vistula Fens).