Light is prevented from being irradiated onto positions different from portions at which photoacoustic images are to be generated. Acoustic waves are transmitted from a probe, and the probe detects reflected acoustic signals of the transmitted ultrasonic waves. The features of the reflected acoustic signals detected by the probe and the features of reflected acoustic signals, which are obtained in advance when the probe is at a position where a photoacoustic image is to be generated, are compared. Light is irradiated onto a subject if it is judged that the features of the reflected acoustic signals match. Photoacoustic signals generated within the subject due to irradiation of laser light are detected, and a photoacoustic image is generated based on the photoacoustic signals.