Washington CNN  — 

With Defense Secretary James Mattis on his way out two months earlier than planned, Deputy Defense Secretary Patrick Shanahan will take the reins of the government’s largest and most complex agency with no military and foreign policy experience.

Shanahan will lead the Pentagon on an interim basis until President Donald Trump names a nominee to be his new defense secretary. Shanahan will be charged with carrying out the President’s orders of withdrawing US troops from Syria, and possibly Afghanistan. A defense official confirmed to CNN Monday that Shanahan has canceled his holiday travel and is heading back to Washington.

Patrick M. Shanahan, deputy secretary of defense, poses for his official portrait in the Army portrait studio at the Pentagon in Arlington, Virginia, July 19, 2017.

A former corporate executive, Shanahan’s portfolio at the Department of Defense has been narrow with no experience in international affairs or with counterterrorism.

Past Pentagon chiefs have served in the role without prior military service, with Ashton Carter – President Barack Obama’s last secretary of defense – as the most recent example.

RELATED: Trump to oust Mattis two months early, announces new acting secretary of defense

For the 17 months, Shanahan was Mattis’ No. 2 in the Pentagon. Shanahan almost exclusively handled internal reform, budget issues and the Space Force, the new military branch proposed by Trump.

A senior administration official told reporters on Sunday that Shanahan had been essentially “running the building” while Mattis focused on policy and outreach to military and allies.

“There is probably nobody who knows the inner workings of the Pentagon more than Pat,” the official said.

Shanahan was confirmed last year by the Senate in a 92-7 vote, but his confirmation process was not without hiccups.

The late Arizona GOP Sen. John McCain took issue with Shanahan’s answer on a foreign policy question and threatened to block his nomination.

McCain said during the June 2017 hearing that he was disturbed by Shanahan’s written answer in a questionnaire submitted to the committee about providing weapons to Ukraine.

In his written answer, Shanahan had said it was an issue he’d “plan to look at closely if I am confirmed” because he did not have access to classified information.

“It’s not satisfactory. Mr. Shanahan,” the former chairman of the Senate Armed Services committee said at the hearing, adding later, “Your response to that question was, frankly, very disappointing to me.”

Shanahan would go on to say that he supported equipping Ukraine with defensive weaponry, but McCain warned him: “Not a good beginning. Do not do that again, Mr. Shanahan, or I will not take your name up for a vote before this committee.”

McCain also raised concerns over Shanahan’s background as a former Boeing executive.

“I have to have confidence that the fox is not going to be put back into the henhouse,” McCain said, worrying about someone employed at one of the “big five” defense contractors taking on a leadership role at the Pentagon.

Shanahan first joined Boeing in 1986 and worked for the major defense contractor for more than three decades before joining the Defense Department.

More recently, he was Boeing’s senior vice president of supply chain and operations and his experience laid largely on the commercial side of the company. Dubbed “Mr. Fix-It” within the company, Shanahan was credited with turning around some of Boeing’s trouble-prone programs, including the 787 Dreamliner.

Shanahan has recused himself from all Boeing issues and in his ethics agreement said he planned to divest from his Boeing-related financial interests.

He also was the vice president and general manager of two of the company’s defense divisions, Boeing Missile Defense Systems and Rotorcraft Systems.

A Washington state native, Shanahan received his undergraduate degree in mechanical engineering from the University of Washington. He also holds two higher degrees from the Massachusetts Institute of Technology.

Shanahan has three children and his late father was an Army veteran who served in Vietnam.

During his hearing, Shanahan credited his father with instilling in him “service before self.”

CNN’s Barbara Starr, Ryan Browne, Elise Labott, Jeremy Herb, Zachary Cohen, and Eli Watkins contributed to this report.