The Senate voted along party lines Wednesday to confirm Stephen Dickson, a longtime Delta Air Lines executive, as head of the Federal Aviation Administration following two Boeing 737 Max crashes and questions about the rigor of agency oversight.

The 52-to-40 vote, with no Democratic support, came in sharp contrast to a bipartisan vote Tuesday to confirm President Trump’s choice to head the Department of Defense, Mark T. Esper. That tally was 90 to 8.

Democratic opposition to Dickson centered on a claim of whistleblower retaliation dating to his tenure as senior vice president of flight operations at Delta.

“We’ve never had a partisan vote on an FAA nominee in the past, and I believe that we should have found consensus on a nominee for the FAA, given all of the concerns the public has about flying safety,” said Sen. Maria Cantwell (Wash.), the ranking Democrat on the Senate Committee on Commerce, Science and Transportation.

But Sen. Roger Wicker (R-Miss.), the committee’s chairman, pointed to Dickson’s 40 years of service as an Air Force officer, fighter pilot, airline captain and senior Delta executive in arguing that he is the right person to be the agency’s permanent administrator.

At Dickson’s confirmation hearing, “he clearly demonstrated the experience and leadership abilities necessary to lead the FAA. I don’t know if there was a single member of the committee . . . who failed to be impressed,” Wicker said.

The agency had been headed on an interim basis for more than a year and a half. Trump had wanted his personal pilot considered for the job, but that idea lacked support in the Senate, and Dickson was nominated shortly after a 737 Max on an Ethiopian Airlines flight crashed.

Whether Dickson’s deep roots in industry will help or hinder efforts to restore faith in the FAA after that crash, and an earlier one in Indonesia, remains to be seen, experts said. The agency certified the safety of the 737 Max, despite flaws that were later discovered in its flight control system, and multiple probes are underway.

“We’ll just have to see whether he’s going to be able to be clear-eyed about safety as being preeminent,” said Carl Tobias, a professor at the University of Richmond School of Law who tracks nominations. “It’s a big question mark about him or anyone who would come from industry.”

Dickson told senators that safety will be his top priority. “Safety is very much a journey, not a destination, and we always need to find ways to improve,” he said.

He also said he would use his experience and perspective to manage changes in the nation’s airspace, such as by accommodating more drones and space launches.

He was noncommittal about what changes may be necessary within the FAA’s certification system, which delegates broad oversight powers to companies such as Boeing. Dickson said he will make sure any recommendations resulting from ongoing probes “are taken seriously and if there are any failures, or processes that need to be adjusted, that I would certainly follow up on that.”

Democrats said their support for Dickson evaporated after they learned of the whistleblower case.

Democratic senators said Delta pilot Karlene Petitt was forced to undergo a psychiatric evaluation and barred from flying in retaliation for speaking out on safety issues.

Petitt was later cleared to fly again after being examined by a different set of psychiatrists, and her whistleblower claim is now before an administrative law judge, who said that Petitt was forced to run a “gauntlet” to be reinstated and that he was “really troubled” by elements of her case, according to a hearing transcript.

On the Senate floor Tuesday, Cantwell said Dickson “was not even candid” about the case, failing to mention it in a questionnaire before his confirmation hearing in May. Dickson also downplayed his involvement, she said.

“I don’t know of any nominee before the Commerce Committee that failed to disclose this kind of information that then moved forward after it was brought up,” Cantwell said.

But Wicker said the committee performed an “extensive review” of the allegations. He said Dickson was not a “named party” in the case and “was not personally alleged to have retaliated against any of his fellow employees who raised the safety concerns.”

Dickson’s responses to the committee “demonstrate that he has commitments to safety and to the protection of employees who report concerns, and that is paramount in his view,” Wicker said.

White House spokesman Judd Deere said Trump selected Dickson because of his decades of experience at Delta, and “the White House has complete confidence” in him. Transportation Secretary Elaine Chao said Dickson is “committed to ensuring that the FAA’s safety culture, and safety record, continue to lead the world.”

White House officials have argued that Dickson has not faced any allegation of personal misconduct and said it is for Delta to answer for the company’s actions, not Dickson.

Delta spokeswoman Lisa Hanna denied that Delta or its managers retaliated against Petitt. “Her referral into a medical review process was out of concern for her well-being and consistent with our absolute commitment to safety. She was not retaliated against by anyone in any way,” Hanna said.

Dickson told senators that, “based on the information available at the time, the company had to act in the best interest of safety.”

But Cantwell, who counts Petitt as one of her constituents, said that the pilot was mistreated and that “no one was holding Mr. Dickson accountable.”

Petitt’s concerns about “inadequate pilot training and not enough pilot rest were things that you thought would have maybe gotten her recognized,” Cantwell said. Instead, the senator said, she came under scrutiny and faced inappropriate questions from the psychiatrist brought in by Delta.

“For example, the doctor cited that just because Officer Petitt had three kids, a job, and helped her husband with his career, she must be manic,” Cantwell said. “The psychiatrist even had the nerve . . . to ask when the first officer was breast-pumping milk for her children,” she said.

According to a hearing transcript, the psychiatrist said: “I asked her — and she was very upset about this — I asked: ‘Did you express the milk,’ because that’s going to take more time. So, basically, she’s doing all of this — I think that’s well beyond what any woman I’ve ever met could do.”

Hanna, the Delta spokeswoman, said the independent psychiatrist brought in by the company’s medical review officer was “highly qualified and experienced,” and the company “is not in position to comment on any particular methodology or question.”

Another medical expert at the Mayo Clinic, after examining Petitt’s case, said, “This has been a puzzle for our group — the evidence does not support presence of a psychiatric diagnosis but does support an organizational/corporate effort to remove this pilot from the rolls,” according to a legal filing.

Hanna said Delta expects “to ultimately prevail” in legal actions brought by Petitt.