A lock (the oldest known, found in…
765 BCE to 622 BCE
A lock (the oldest known, found in the ruins of the palace of Dur-Sharrukin ("Fortress of Sargon"), present day Khorsabad, near ancient Nineveh), the Assyrian capital in the time of Sargon II of Assyria, consists of a large wooden bolt pierced with holes; pins from the lock housing drop through the holes to secure the bolt.
The key, a long wooden bar fitted on one end with a pattern of pegs corresponding to the pins in the bolt, lifts the pins and allows the bolt to slide.