[1][2] The keys were kept by the Governor who would hand them to the Port (Gate) Sergeant each evening at sunset, so that the four land entrances could be locked shut.
[3] During the Great Siege, the Governor, General Sir George Augustus Eliott, reputedly would carry the keys with him everywhere; it was rumoured he slept with them under his pillow at night.
The ceremony was reinstituted in 1933[3] and is currently performed twice a year (in April and October) by the Royal Gibraltar Regiment and visiting British units and bands.
In the modern version of the ceremony, at the firing of the sunset gun, after the flags have been lowered, the Governor of Gibraltar symbolically hands the keys of the fortress to the Port Sergeant.
The Port Sergeant, accompanied by an armed escort, marches away to symbolically lock the gates of the fortress for the night before returning the keys to the Governor.