DÜSSELDORF, Germany — Before he received his pilot’s license or achieved his dream of flying passenger jets, the co-pilot of the crashed Germanwings jetliner was so troubled that he underwent treatment for “suicidal tendencies,” a prosecutor said Monday, raising questions about what the airline should have known about his condition.

The co-pilot, Andreas Lubitz, was at the controls last week as the Airbus A320 jet dived from cruising altitude to smash into the French Alps, killing all 150 people onboard. French officials said the crash appeared to have been no accident, but an intentional act on the part of Mr. Lubitz.

Mr. Lubitz, 27, had been treated by psychotherapists “over a long period of time,” the public prosecutor’s office in Düsseldorf said in a statement on Monday, without providing specific dates. In follow-up visits to doctors since that time, the prosecutor said, “no signs of suicidal tendencies or aggression toward others were documented.”

Under current German law that emphasizes privacy, it was up to Mr. Lubitz to disclose his history to doctors examining his fitness to fly, according to Roland Quast, medical director of Aeromedical Center Germany in Stuttgart.

Image Andreas Lubitz Credit... Michael Mueller/Associated Press

“What is decisive is that the pilot tells the truth,” he said. “If he lies, we don’t have lie detectors.”

Mr. Lubitz’s medical history has raised questions over how much leeway medical professionals should have to inform the authorities about patients in positions that could affect public safety. Parliamentary deputies from Germany’s governing coalition have called for doctors to break confidentiality when a patient shows suicidal tendencies. Karl Lauterbach, a Social Democrat and a medical expert, told the daily newspaper Bild that if lives could be endangered, “the doctor has a duty to inform the employer about the unsuitability of the employee to do his work.”

That applies “especially in the case of psychiatric illness and the possible danger of suicide,” he said.

Heinz Joachim Schöttes, a spokesman for Germanwings, said Monday that the airline was aware of the prosecutor’s statement about Mr. Lubitz but declined to comment.