BERLIN—German officials say a device found on a railway station platform in Bonn could have caused a dangerous explosion if detonated, and they're looking for two people who may be involved in the case.

The device was found in a bag Monday and defused. Investigators said Wednesday it was composed of four butane gas cartridges, a metal pipe containing ammonium nitrate powder, three batteries and an alarm clock—but they haven't found any detonator.

Investigator Norbert Wagner said authorities are seeking a man seen carrying a bag in security footage from a station restaurant, as well as another man whom children reported seeing leaving the bag containing the device on the platform.

Police detained two men Tuesday, including a local Islamist radical, but released them for lack of evidence.