WASHINGTON — The Senate, on party lines on Wednesday, confirmed Stephen Dickson, a former Delta Air Lines executive, to head the Federal Aviation Administration for a five-year term, giving permanent leadership to an agency embattled over the deadly crashes of two Boeing jets.

The 52-to-40 vote was unusually divided for the agency, which has not had permanent leadership for more than a year and a half. That, in part, reflected concerns from some Senate Democrats about Mr. Dickson’s involvement in a whistle-blower case at Delta. The partisan vote contrasted with the Senate’s 90-to-8 vote on Tuesday to confirm Mark T. Esper as secretary of defense.

“We’ve never had a partisan vote on an F.A.A. nominee in the past, and I believe that we should have found consensus on a nominee for the F.A.A., given all of the concerns the public has about flying safety,” said Senator Maria Cantwell of Washington State, the top Democrat on the Senate Committee on Commerce, Science and Transportation.

Mr. Dickson’s nomination was the first to advance out of the committee on party lines.

The confirmation of Mr. Dickson — who retired from Delta last fall after 27 years of flying commercial routes and overseeing regulatory compliance, safety and pilot training — comes at a time of increasing pressure on the aviation agency.