an electronic key system which checks , using two - way communication , a key code stored in an electronic key against a key code stored in a lock device that locks an entrance to a predetermined space , and allows an unlocking operation of the lock device if the key code stored in the electronic key matches the key code stored in the lock device , is such that the key code includes an identification code unique to the electronic key and a property code indicative of a property of the electronic key . the lock device erases a key code that includes a property code indicating that the key is an additional key , from among the key codes stored in the lock device , when a predetermined operation is performed .