HP has recalled more than half a million digital cameras, citing the risk of a fire hazard from an overheated battery.

The company learned of the problem when a customer complained that his Photosmart R707 digital camera had caught fire while plugged into its docking station, according to a press release by the US Consumer Product Safety Commission.

The flames damaged the camera and filled the room with smoke, but the customer was not injured.

The problem is caused by a mistake in the camera's firmware that kicks in when the device is plugged into an AC adapter or docking station, and attempts to charge non-rechargeable batteries such as the Duracell CP-1, HP said.

HP has issued a repair patch here that customers can download to their cameras.

The recall affects 679,000 cameras worldwide, including 224,000 sold in the US. HP sold the 5.1Mp (megapixel) camera from August 2004 until April 2006 for prices ranging from $250 to $400 (about £135 to £220).

The company has since launched several new generations of digital cameras, including the top-of-the-line R725, R727 and R927, with larger LCDs and greater resolution.