The apparently depressed pilot of the Malaysian airliner that disappeared more than five years ago with 239 people aboard was in control of the plane “until the end” and made “abnormal turns” before crashing, according to French investigators.

The team was given access to a “considerable amount” of flight data from the doomed Boeing 777, which vanished shortly after taking off for Beijing from Kuala Lumpur, Malaysia, on March 8, 2014, news.com.au reported.

The data “lends weight” to suspicions that Capt. Zaharie Ahmad Shah, 53, who is widely believed to have been depressed, deliberately sent Flight MH370 into the Indian Ocean in a murder-suicide, according to a report in Le Parisien.

“Certain abnormal turns made by the 777 can only have been carried out manually. Someone was in control,” said a source close to the inquiry, according to news.com.au.

“There is nothing to suggest anyone else entered the cockpit,” the source added.

Last month, Shah’s friends told aviation specialist William Langewiesche that he had become obsessed with two young models he had seen online after his wife left him — and that he “spent a lot of time pacing empty rooms,” the UK’s Telegraph reported.

“There is a strong suspicion among investigators in the aviation and intelligence communities that he was clinically depressed,” Langewiesche wrote in The Atlantic magazine.

“Zaharie’s marriage was bad. In the past he slept with some of the flight attendants. And so what? We all do,” one old pal told the magazine.

“You’re flying all over the world with these beautiful girls in the back. But his wife knew,” the friend added.

An electrical engineer quoted in the mag said that after depressurizing the plane, the pilot probably made a climb that “accelerated the effects of depressurizing, causing the rapid incapacitation and death of everyone in the cabin.”

Oxygen masks in the main cabin were only designed to last 15 minutes, but the cockpit crew would have had access to oxygen that could have lasted for hours.

“The cabin occupants would have become incapacitated within a couple of minutes, lost consciousness, and gently died without any choking or gasping for air,” wrote Langewiesche, who said Shah could have killed his co-pilot.

In July 2018, investigators released a 495-page report, saying the plane was taken off course by someone who deliberately manipulated the controls — but they were unable to determine who did it.

The only nation still conducting a judicial investigation into the crash is France, where two magistrates are looking into the deaths of three citizens, the wife and two children of Ghyslain Wattrelos.

Wattrelos, an engineer who met the judges on Wednesday, told le Parisien that he hoped “that by analyzing all the data collected at Boeing they will discover a problem that will be obvious to them.”

“For example, we know that the data initially provided by Malaysian authorities on the plane’s altitude were wrong,” he said, adding that he remained convinced the plane was “taken down”

The judges informed him that Boeing had finally granted them access in late May to the vital flight data — including data from UK-based satellite company Inmarsat — at the plane maker’s headquarters in Seattle.

Among various conspiracy theories in the plane’s disappearance are that it was shot down, flown to a secret location as a result of sensitive material aboard or even hijacked to North Korea, according to the UK’s Sun.