Portcullises fortified the entrances to many medieval castles, securely closing off the castle during time of attack or siege. Every portcullis was mounted in vertical grooves in the walls of the castle and could be raised or lowered quickly by means of chains or ropes attached to an internal winch.