Photomeson production in active galactic nuclei.