BERLIN — The German police, suspecting a 44-year-old man in the western city of Recklinghausen of disseminating child pornography, ordered a raid on his apartment. During their search, they opened a closet and found a teenage boy.

“It was a 15-year-old who had been missing for a long time,” the police said Friday in a statement. According to posters and information that his mother, Manuela Bock, posted to her Facebook page, he had been gone for 922 days.

Ms. Bock had been searching for him since June 2017, when he left a halfway house in Duisburg where he had been living and never returned. She tried to keep his name and image in the public eye, circulating missing persons posters and appearing on a local television show in search of public tips that might lead to his discovery.

All that time, she said, she never gave up hope that her son was alive.

“For two and a half years I imagined what it would be like to see him again,” she told the weekly newspaper Bild am Sonntag in an interview published on Sunday. “But it wasn’t as I imagined. It was crazy! You can’t speak, you just want to take your child with you.”