the fortress and the surrounding land changed hands several times