BERLIN (AP) — Swiss investigators said Thursday that “high-risk flying” by the pilots of a vintage propeller plane led to a 2018 crash in the Alps that killed all 20 people on board.

The 79-year-old Junkers Ju-52 operated by local airline Ju-Air crashed in southeastern Switzerland on Aug. 4, 2018.

The airplane, which was carrying 17 passengers and three crew members, slammed near-vertically into a mountain. It was flying back from Locarno in southern Switzerland to its base near Zurich.

The Swiss Transportation Safety Investigation Board said in its final report that “the pilots’ high-risk flying was a direct cause of the accident.”

As they entered a narrow mountain valley, “the flight crew piloted the aircraft at low altitude, with no possibility of an alternative flight path and at an airspeed that was dangerously low for the circumstances,” investigators said.

As the plane hit turbulence in the valley, “the high-risk manner of flying through these not unusual turbulences caused the pilots to lose control of the aircraft,” they added. The plane was flying too low to have enough space to recover.

The report also found that the aircraft’s center of gravity was too far to the rear during the doomed flight, a “dangerous situation (that) was caused by inadequate flight preparation and errors in the Ju-Air software.”

It said that the pilots “had become accustomed … to not complying with rules for safe flight operations and taking high risks even with passengers on board,” and that Ju-Air failed to recognize the risks or to prevent them from violating the rules.

The report also faulted Switzerland’s Federal Office of Civil Aviation for failing to identify “numerous safety problems” at Ju-Air or being ineffective in dealing with them.

That office in March 2019 revoked Ju-Air’s commercial flight license after reviewing the risks of passenger flights with vintage planes, but said it could, if it fulfilled various conditions, continue private flights for registered members.

Ju-Air said in a statement Thursday that it “will do everything to learn from the crash.”

It said it is “glad that the direct causes of the accident could be shown clearly” and is analyzing the issue of a problem with the center of gravity. Evaluations suggest that issue first arose 35 years before the crash, but had caused no problems in the intervening time and hadn’t been noticed by Ju-Air or regulators, the company said.

It added that issues that led to pilots’ risky behavior going undiscovered will be addressed in the future selection, training and oversight of pilots.