A device for fastening a door or gate to restrict entrance. (Jg 3:23, 24; Ne 3:3, 6, 13-15) The lock of ancient times usually consisted of a bolt of wood that could slide sideways through a groove in a wooden upright attached to the door. To lock the door, the bolt was pushed into a socket in the doorpost and was secured by wooden or iron pins falling from the upright into holes in the bolt. To unlock the door, a key was inserted to raise the pins, thus enabling the bolt to be brought back to the unlocked position. The socket, or hollow, into which the bolt was inserted is referred to by the Shulammite girl in recounting a dream she had in which her shepherd lover was kept away from her by means of a locked door.—Ca 5:2-5; see KEY.