BERLIN (Reuters) - Three years after the Germanwings crash in which a pilot deliberately flew a jet into a mountainside, the European Commission has adopted new rules on pilot mental health requiring airlines for the first time to carry out a psychological assessment of pilots before they hire them.

FILE PHOTO: A screen shows a picture of Andreas Lubitz during news conference of Guenter Lubitz in Berlin, Germany, March 24, 2017. REUTERS/Fabrizio Bensch/File Photo

Investigators have concluded that pilot Andreas Lubitz locked the captain out of the cockpit and deliberately flew the Germanwings A320 jet into a French mountainside on March 24, 2015 on a flight from Barcelona to Duesseldorf, killing all 150 people on board.

Prosecutors have said Lubitz was suffering from a mental disorder with psychotic symptoms that led to suicidal thoughts but he had concealed his illness from his employer, part of the Lufthansa group.

The new rules seek to prevent a similar tragedy by providing all pilots with access to a support program in case of mental health problems and by making European airlines perform a psychological assessment of pilots before they start work.

Pilots are already subject to annual medical checks but these have not routinely included a full mental health assessment.

Random alcohol testing for all European airlines and those foreign carriers which fly into the European Union will become mandatory, while flight and cabin crew will also face more testing for psychoactive substances.

Lufthansa said it welcomed the new rules and would implement ones that weren’t already in place.

For example, random alcohol and drug testing rules came into force in Germany already last year in response to Germanwings, while psychological assessments have been parts of Lufthansa’s selection and recruitment process for years.

The rules are based on safety recommendations made by the European Aviation Safety Agency (EASA).

“With these rules Europe introduces the right tools to safeguard the mental fitness of air crew,” EASA executive director Patrick Ky said in a statement.

Airlines and EU member states now have a two-year transition period in which to implement the new rules.