US President Donald Trump speaks as Defense Secretary James Mattis (L) looks on during a meeting with senior military leaders in the Cabinet Room of the White House on October 5, 2017. / AFP PHOTO / MANDEL NGAN        (Photo credit should read MANDEL NGAN/AFP/Getty Images)
MANDEL NGAN/AFP/Getty Images
US President Donald Trump speaks as Defense Secretary James Mattis (L) looks on during a meeting with senior military leaders in the Cabinet Room of the White House on October 5, 2017. / AFP PHOTO / MANDEL NGAN (Photo credit should read MANDEL NGAN/AFP/Getty Images)
Now playing
02:03
Trump forcing Mattis out by New Year's Day
President Joe Biden speaks about reaching 300 million COVID-19 vaccination shots, in the State Dining Room of the White House, Friday, June 18, 2021, in Washington.
Evan Vucci/AP
President Joe Biden speaks about reaching 300 million COVID-19 vaccination shots, in the State Dining Room of the White House, Friday, June 18, 2021, in Washington.
Now playing
01:31
'A private matter': Biden on US Catholic bishops' potential rebuke
Critical Race Theory
KSDK
Critical Race Theory
Now playing
04:39
Mom gets emotional during heated forum on critical race theory
FILE - This June 8, 2021 file photo shows the Supreme Court building in Washington. A Thursday, June 17, 2021 Supreme Court ruling that favored Catholic Social Services in Philadelphia was far from the constitutional gale wind that would have reshaped how courts interpret religious liberty under the First Amendment. Governmental entities are now on notice that if they want to ban discrimination against LGBTQ persons or anyone else, they had better not allow for any exceptions -- or else religious groups will have the right to ask for them, and they'll have a strong case for getting them. (AP Photo/J. Scott Applewhite)
J. Scott Applewhite/AP
FILE - This June 8, 2021 file photo shows the Supreme Court building in Washington. A Thursday, June 17, 2021 Supreme Court ruling that favored Catholic Social Services in Philadelphia was far from the constitutional gale wind that would have reshaped how courts interpret religious liberty under the First Amendment. Governmental entities are now on notice that if they want to ban discrimination against LGBTQ persons or anyone else, they had better not allow for any exceptions -- or else religious groups will have the right to ask for them, and they'll have a strong case for getting them. (AP Photo/J. Scott Applewhite)
Now playing
03:32
Obamacare has survived over 2,000 attempts to kill it
mike pence heckled at conservative conference vpx _00000918.png
CNN
mike pence heckled at conservative conference vpx _00000918.png
Now playing
02:21
Mike Pence heckled at conservative conference
This Morning
Now playing
03:22
Ted Cruz: Critical race theory is as racist as Klansmen
YouTube/Department of Justice
Now playing
03:56
New video shows police getting punched during Capitol riot
CNN
Now playing
03:55
See grandmother's priceless reaction after Juneteenth bill passes
US President Donald Trump speaks during a "Make America Great Again" rally at the Eastern Kentucky University, in Richmond, Kentucky, on October 13, 2018. (Photo by Nicholas Kamm / AFP)        (Photo credit should read NICHOLAS KAMM/AFP via Getty Images)
NICHOLAS KAMM/AFP/AFP via Getty Images
US President Donald Trump speaks during a "Make America Great Again" rally at the Eastern Kentucky University, in Richmond, Kentucky, on October 13, 2018. (Photo by Nicholas Kamm / AFP) (Photo credit should read NICHOLAS KAMM/AFP via Getty Images)
Now playing
04:19
Haberman: This underscored for Trump that he's not president
WASHINGTON, DC - MARCH 29: Fox News host Tucker Carlson discusses 'Populism and the Right' during the National Review Institute's Ideas Summit at the Mandarin Oriental Hotel March 29, 2019 in Washington, DC. Carlson talked about a large variety of topics including dropping testosterone levels, increasing rates of suicide, unemployment, drug addiction and social hierarchy at the summit, which had the theme 'The Case for the American Experiment.'  (Photo by Chip Somodevilla/Getty Images)
Chip Somodevilla/Getty Images
WASHINGTON, DC - MARCH 29: Fox News host Tucker Carlson discusses 'Populism and the Right' during the National Review Institute's Ideas Summit at the Mandarin Oriental Hotel March 29, 2019 in Washington, DC. Carlson talked about a large variety of topics including dropping testosterone levels, increasing rates of suicide, unemployment, drug addiction and social hierarchy at the summit, which had the theme 'The Case for the American Experiment.' (Photo by Chip Somodevilla/Getty Images)
Now playing
02:48
Carlson promotes conspiracy that FBI planned Capitol riot
CNN
Now playing
02:55
Abrams says she is open to Manchin's voting rights legislation
CNN
Now playing
01:56
Toobin: Huge victory for Obamacare, but fight isn't over
Split Fanone Clyde
CNN/Pool
Split Fanone Clyde
Now playing
04:26
DC officer Fanone recalls interaction with GOP Rep.: He ran away 'like a coward'
President Joe Biden and Russian President Vladimir Putin, arrive to meet at the 'Villa la Grange', Wednesday, June 16, 2021, in Geneva, Switzerland.
Patrick Semansky/AP
President Joe Biden and Russian President Vladimir Putin, arrive to meet at the 'Villa la Grange', Wednesday, June 16, 2021, in Geneva, Switzerland.
Now playing
02:58
Biden and Putin hold first face-to-face meetings
Now playing
03:40
Arizona voting data taken to so-called 'lab' in remote Montana
President Joe Biden speaks to the news media following a news conference after meeting with Russian President Vladimir Putin, Wednesday, June 16, 2021, in Geneva, Switzerland.
Patrick Semansky/AP
President Joe Biden speaks to the news media following a news conference after meeting with Russian President Vladimir Putin, Wednesday, June 16, 2021, in Geneva, Switzerland.
Now playing
03:45
Biden apologizes for firing back at CNN's Kaitlan Collins after question
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.
Monica King/Digital/U.S. Army photo
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.