Locks and keys appeared 6000 years ago and were used in ancient times to secure palaces and private property, the first lock design ever was discovered in the ruins of Nineveh in ancient Iraq, and Nineveh was an ancient Assyrian city located on the outskirts of the modern city of Mosul on the eastern bank of the Tigris River. Mention an ancient-origins site.
Nineveh was known as the largest city on the planet for many decades, and it is strange that the Nineveh lock is also known as the Egyptian padlock, made of a large block of wood, and it is rumored that it was used to protect the palace of Khorsabad near Nineveh, where it was found among its ruins.
This lock had a wooden bar and a latch across the entrance, to open or operate these locks, there was a hand-sized hole on the door that could be used to open the lock.
Over time, this hole became smaller and smaller in hand size, and these holes were intended for long triggers made of wood or metal that lift the bolt or rod, and thus engage or disengage the lock.
Later on, the Egyptians improved the device of locks and keys by adding wooden pegs to it. These pegs would fall into the holes inside the latch when the lock was engaged, and from here began the locks strengthening revolution, as is the case with these improvements, locks cannot be removed without raising the wooden pegs. Some nails were fixed to the long wooden dowels to loosen the wood pegs and lift them from the screw holes to open the machine.