What is a movable piece which holds anything in place by entering a notch or cavity; specifically, the catch which holds a door or gate when closed, though it be not bolted called?

latch — A movable piece which holds anything in place by entering a notch or cavity; specifically, the catch which holds a door or gate when closed, though it be not bolted. (Webster's 1913.)

Sources