Warsaw remained the capital of the Polish–Lithuanian Commonwealth until 1795, when it was annexed by the Kingdom of Prussia in the third and final partition of Poland; it subsequently became the capital of the province of South Prussia. During this time, Louis XVIII of France spent his exile in Warsaw under the pseudonym ''Comte de Lille''.