Delta Air Lines has settled allegations by a pilot who said the airline ordered her to undergo a psychiatric examination and barred her from flying in retaliation for raising safety concerns to company executives.

The settlement approved Friday ends a long-running dispute in which a federal arbiter agreed with many of the pilot’s claims and said Delta failed to show any faults in her flying ability. In 2019, the case threatened to derail former President Donald Trump’s choice to lead the Federal Aviation Administration.

Terms of the settlement were confidential, although the pilot’s law firm said they were “consistent with” the arbiter’s 2020 ruling, which said Karlene Petitt deserved to get $500,000 in compensation for damage to her career.

Atlanta-based Delta declined to comment.

Pilot filed claims under whistleblower law

Petitt pressed her case under a 2000 law designed to protect whistleblowers who report issues of aviation safety.

In early 2016, Petitt gave two top Delta executives a report running more than 40 pages in which she raised allegations about pilots being forced to fly when they were fatigued, gaps in Delta’s pilot training, falsification of training records and other issues. She also emailed the airline’s CEO.

After meeting with Delta officials, Petitt was referred to a psychiatrist picked by the airline, who diagnosed a bipolar disorder. Petitt was grounded for nearly two years until independent doctors found her fit to fly.

Federal safety regulators looked into Petitt’s allegations and determined that Delta was not counting time that pilots spent commuting by air to flights toward their maximum work day. Delta said it changed the policy.

In 2019, the case delayed a vote on the nomination of Delta executive Stephen Dickson to lead the FAA. Dickson had authorized grounding Petitt for a psychiatric evaluation. Senate Democrats said the allegations raised questions about Delta’s safety culture and Dickson’s candor because he did not mention the case in a questionnaire that asked if he were involved in any legal proceedings.

The Senate confirmed Dickson by a 52-40 vote in July 2019, but he stepped down from the FAA this year before the end of his five-year term, citing personal reasons.

The settlement between Delta and Petitt was approved Friday by Labor Department administrative law judge Scott Morris in New Jersey.