The Senate voted 89-6 on Wednesday to confirm Mark Esper as Army secretary.

Esper, a top lobbyist for defense giant Raytheon and former Army infantry officer, was nominated in July and was President Trump’s third pick to be the top civilian leader of the largest branch of the military after two previous nominees dropped out due to financial concerns and controversy.

The confirmation fills a key Pentagon post in the Trump administration even as about 70 percent of lower level Senate-confirmed positions in the building remain unfilled more than nine months after the president took office.

"His record of service in the Army, in the Pentagon, and on Capitol Hill provides the foundation for the leadership our soldiers deserve," Sen. John McCain, R-Ariz., said on the Senate floor in a speech supporting the nomination. "I’m also confident that he will call upon his experience in the private sector to bring a reform mindset to the many challenges facing our Army such as the readiness crisis and the urgent gaps in capabilities and modernization."

At Raytheon, Esper was named vice president for government relations in 2010 but he also served as deputy assistant secretary of defense for negotiations policy in President George W. Bush's administration, a position that oversaw arms control and nonproliferation efforts, and was a professional staff member on the House Armed Services and Senate Foreign Relations committees.

Esper, a West Point graduate, retired as a lieutenant colonel after 21 years of military service that included leading troops in the 1991 Persian Gulf War.

“As an infantry platoon leader at the front with soldiers of the 101st Airborne Division, he knows, as few people do, the real cost of our national security and the real challenge of being in our Army, because it’s keeping faith with those young men and women," said Sen. Jack Reed, D-R.I., the ranking member on the Senate Armed Services Committee.

Trump's first choice to head the Army, billionaire businessman Vincent Viola, dropped out in February over concerns about disentangling his finances. The second Army secretary nominee, Tennessee state senator Mark Green, bowed out in May after his comments about gay marriage, transgender rights and Islam caused a political backlash.