Senators confirmed on Wednesday former Raytheon executive Mark Esper as the new Army secretary, filling the service’s top civilian post after nearly a year of nomination turmoil for the White House.

Esper is a former Army lieutenant colonel who graduated from the U.S. Military Academy at West Point in 1986. He served for more than a decade on active duty, including a combat tour in Iraq during the first Gulf War.

He also served as deputy assistant secretary of defense under former President George W. Bush and as both a House Armed Services Committee staffer and director of national security affairs for then-Senate Majority Leader Bill Frist.

Esper was easily confirmed by the Senate, with a 89-6 vote.

But filling the post was far less smooth for the administration. Esper was President Donald Trump’s third pick for the job, with each of the first two withdrawing before confirmation hearings began.

In February, Vincent Viola withdrew his name from consideration for the post, citing strict Defense Department rules concerning his family businesses. He is the founder of digital stock trading firm Virtu Financial and owner of the National Hockey League’s Florida Panthers.

In May, Trump’s second nominee — Tennessee state Sen. Mark Green — withdrew his name from consideration after what he called “false and misleading attacks” concerning his past comments on gay rights and evolution.

Esper was nominated over the summer, but his confirmation hearings were delayed by congressional recesses and fighting between Pentagon and Senate officials over communications on policy and operational issues.

When his nomination hearing took place earlier this month, Esper said his top priority as Army secretary would be a focus on service readiness.

“This means recruiting and retaining the best our nation has to offer, ensuring these young men and women are well-trained and well-led, and equipping them with the best weapons and technology available,” he told senators. “Every unit must be prepared to deploy and accomplish its mission. These are the fundamental (job) duties of the secretary of the Army.”

Before Wednesday’s vote, Senate Armed Services Committee Chairman John McCain, R-Ariz., praised Esper as a commendable pick for the post.

“We owe our young men and women in uniform leadership that fits their service,” McCain said. “I’m confident that (Esper) will provide our Army with that leadership. His record of service in the Army, in the Pentagon and on Capitol Hill provides the foundation for the leadership our soldiers deserve.”

The Army has only had a full-time secretary for a few months over the last two years. Army Secretary Eric Fanning was nominated to replace John McHugh in late 2015, but did not officially take over the job until May because of a lengthy confirmation fight with Congress. Undersecretary of the Army.Secretary Patrick Murphy served in an acting role for more than four months.

Since Trump’s inauguration, the acting secretary post has been held by Robert Speer and Ryan McCarthy.