An electronic device which is operable by power supplied from a battery, the electronic device comprising: a first mounting unit to which a first battery is mounted in a detachable manner; a second mounting unit to which a second battery different from the first battery is mounted in a detachable manner; a built-in battery incorporated in a main body; a first switch configured to alternatively select a battery for supplying power to the electronic device from the first battery mounted to the first mounting unit and the second battery mounted to the second mounting unit; a second switch configured to switch on and off a supply of power from the built-in battery to the electronic device; a first latch configured to lock the first battery mounted to the first mounting unit; a second latch configured to lock the second battery mounted to the second mounting unit; a latch opening/closing detector configured to detect opening/closing of the first latch and the second latch; a battery remaining amount detector configured to detect remaining amounts of the first battery and the second battery; and a power controller configured to control the first switch; the power controller is further configured to control the first switch based on detection results of the latch opening/closing detector and the battery remaining amount detector; characterized in that the power controller is further configured to control the second switch based on detection results of the latch opening/closing detector and the battery remaining amount detector; wherein when the latch opening/closing detector detects opening of at least one of the first latch and the second latch, the power controller is further configured: to control the second switch so that the built-in battery is capable of supplying power to the electronic device, and to control the first switch so that power is supplied to the electronic device from one of the first battery and the second battery which can supply power based on a detection result of the battery remaining amount detector. a first mounting unit to which a first battery is mounted in a detachable manner; a second mounting unit to which a second battery different from the first battery is mounted in a detachable manner; a built-in battery incorporated in a main body; a first switch configured to alternatively select a battery for supplying power to the electronic device from the first battery mounted to the first mounting unit and the second battery mounted to the second mounting unit; a second switch configured to switch on and off a supply of power from the built-in battery to the electronic device; a first latch configured to lock the first battery mounted to the first mounting unit; a second latch configured to lock the second battery mounted to the second mounting unit; a latch opening/closing detector configured to detect opening/closing of the first latch and the second latch; a battery remaining amount detector configured to detect remaining amounts of the first battery and the second battery; and a power controller configured to control the first switch; the power controller is further configured to control the first switch based on detection results of the latch opening/closing detector and the battery remaining amount detector; characterized in that the power controller is further configured to control the second switch based on detection results of the latch opening/closing detector and the battery remaining amount detector; wherein when the latch opening/closing detector detects opening of at least one of the first latch and the second latch, the power controller is further configured: to control the second switch so that the built-in battery is capable of supplying power to the electronic device, and to control the first switch so that power is supplied to the electronic device from one of the first battery and the second battery which can supply power based on a detection result of the battery remaining amount detector. to control the second switch so that the built-in battery is capable of supplying power to the electronic device, and to control the first switch so that power is supplied to the electronic device from one of the first battery and the second battery which can supply power based on a detection result of the battery remaining amount detector.