Smallest electronic device such as e.g. a hearing instrument being operated by means of a battery which comprises a battery compartment (1) or the at least one battery (3) for power supply of the device. The battery (3) is locked in the compartment (2) to prevent removal or falling out of the battery.