The Senate on Tuesday confirmed Mark Esper as defense secretary by a 90-8 vote, thus ending the Pentagon’s roughly seven-month stretch without a permanent leader.

Esper is a lobbyist for military contractor Raytheon who served in the Army during the 1991 Persian Gulf war. He will succeed acting Defense Secretary Patrick Shanahanwho abruptly resigned last month before the Senate could even confirm him as he became engulfed in a controversy over an alleged domestic violence dispute with his ex-wife in 2010. Shanahan himself replaced Jim Mattisa former Marine Corps general who stepped down as the Defense Department’s leader in December due to disagreements with the White House’s policy regarding the pullout of American troops from Syria.

Esper, 55, will now be at the helm of one of the world’s largest militaries that counts 1.2 million active-duty troops. Among the major challenges he will face as leader of the Pentagon is finding a way to ease tensions with Iran, with whom military confrontation appears increasingly likely and on whom the United States has imposed several economic sanctions as a way to curb its nuclear enrichment capabilities.

SLIDESHOW: TOP DEMOCRATS RUNNING FOR PRESIDENT IN 2020

The former lobbyist will also have to help President Donald Trumps administration determine a solution to ending the war in Afghanistan. Esper will also need to learn to work with hawkish figures like Secretary of State Mike Pompeo and national security adviser John Boltonboth of whom have played major roles with regards to foreign police issues since Mattis’ departure in December.