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)
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)
PHOTO: MANDEL NGAN/AFP/Getty Images
Now playing
02:07
James Mattis' last day as defense secretary
Now playing
04:22
Trump's influential supporters spoke of what was coming before riot
McCarthy
McCarthy
PHOTO: CNN
Now playing
01:40
'Far too close:' Army secretary reveals sobering details on riot
Sen. Graham/Erin Burnett split
Sen. Graham/Erin Burnett split
PHOTO: Fox News/CNN
Now playing
04:08
Burnett: Sen. Graham became 'sycophant in chief' under Trump
US President Donald Trump waves to the media as he makes his way to board Air Force One before departing from Andrews Air Force Base in Maryland on January 12, 2021. - Trump is traveling to Texas to review his border wall project. (Photo by MANDEL NGAN / AFP) (Photo by MANDEL NGAN/AFP via Getty Images)
US President Donald Trump waves to the media as he makes his way to board Air Force One before departing from Andrews Air Force Base in Maryland on January 12, 2021. - Trump is traveling to Texas to review his border wall project. (Photo by MANDEL NGAN / AFP) (Photo by MANDEL NGAN/AFP via Getty Images)
PHOTO: Mandel Ngan/AFP/Getty Images
Now playing
03:44
Trump mostly in seclusion during final days of presidency
PHOTO: KamalaHarris/Twitter
Now playing
01:28
Kamala Harris says goodbye to California Senate seat
PHOTO: @FLOTUS
Now playing
02:51
Watch Melania Trump's farewell message
UNITED STATES - JANUARY 4: Rep. Lauren Boebert, R-Colo., is seen during a group photo with freshmen members of the House Republican Conference on the House steps of the Capitol on Monday, January 4, 2021. (Photo By Tom Williams/CQ-Roll Call, Inc via Getty Images)
UNITED STATES - JANUARY 4: Rep. Lauren Boebert, R-Colo., is seen during a group photo with freshmen members of the House Republican Conference on the House steps of the Capitol on Monday, January 4, 2021. (Photo By Tom Williams/CQ-Roll Call, Inc via Getty Images)
PHOTO: Tom Williams/CQ-Roll Call, Inc/Getty Images
Now playing
02:49
GOP lawmaker accused of giving 'reconnaissance' tour prior to Capitol riot
PHOTO: CNN
Now playing
04:36
Former FBI adviser calls Trump a charismatic spark for extremism
Andrew McCabe 0118
Andrew McCabe 0118
PHOTO: CNN
Now playing
02:01
Andrew McCabe compares Capitol attack to Benghazi attack
Now playing
03:07
Avlon: Here's a way to turn down the 'MAGAphone'
PHOTO: CNN
Now playing
02:09
Lawmaker slams riot: 'Damned if I'll let it' shake faith in democracy
PHOTO: CNN
Now playing
04:01
Raskin: I'm not losing my son in 2020 and my country in 2021
Now playing
01:19
Sen. King: Cutting off Trump's intel access should be easy decision for Biden
A sign for the National Security Agency (NSA), US Cyber Command and Central Security Service, is seen near the visitor
A sign for the National Security Agency (NSA), US Cyber Command and Central Security Service, is seen near the visitor's entrance to the headquarters of the National Security Agency (NSA) after a shooting incident at the entrance in Fort Meade, Maryland, February 14, 2018. - Shots were fired early Wednesday at the ultra-secret National Security Agency, the US electronic spying agency outside Washington, leaving one person injured, officials said. Aerial footage of the scene from NBC News showed a black SUV with numerous bullet holes in its windshield crashed into concrete barriers at the main entrance to the NSA's headquarters in Fort Meade, Maryland. (Photo by SAUL LOEB / AFP) (Photo by SAUL LOEB/AFP via Getty Images)
PHOTO: Saul Loeb/AFP/Getty Images
Now playing
01:31
Christopher Miller orders NSA chief to install Trump loyalist as agency's top lawyer
Now playing
02:38
Biden: Science team 'among the brightest, most dedicated'
(CNN) —  

Secretary of Defense James Mattis and the State Department’s anti-ISIS envoy, Brett McGurk, bid farewell to their respective departments Monday after parting ways with President Donald Trump’s administration over his plans to reduce the American presence in Syria.
Mattis told Pentagon employees to “keep the faith in our country” and McGurk wished his former colleagues well “as they work under extremely difficult circumstances to protect the interests of our great country.

“Our Department is proven to be at its best when the times are most difficult,” Mattis wrote in a message to Defense Department employees. “So keep the faith in our country and hold fast, alongside our allies, aligned against our foes.”

Mattis also expressed confidence in the department’s leadership as his deputy defense secretary, Patrick Shanahan, prepares to take over as acting secretary.

“Our Department’s leadership, civilian and military, remains in the best possible hands. I am confident that each of you remains undistracted from our sworn mission to support and defend the Constitution while protecting our way of life,” his statement read.

Mattis concluded, “It has been my high honor to serve at your side. May God hold you safe in the air, on land, and at sea.”

In a tweet, McGurk, who worked in the State Department, said that he wishes his “former civilian and military colleagues well as they work under extremely difficult circumstances to protect the interests of our great country. It was a privilege to serve alongside them.”

The former four-star Marine Corps general, whose last day is Monday, announced his resignation in late December with a letter saying his views were not aligned with those of President Donald Trump, who had just announced plans to withdraw US troops from Syria.

“Because you have the right to have a Secretary of Defense whose views are better aligned with yours on these and other subjects, I believe it is right for me to step down from my position,” Mattis wrote in his letter to the President.

McGurk, whose last day was Monday, submitted his resignation a day after Mattis. Two senior officials and several sources familiar with his thinking told CNN he did so in response to Trump’s decision to withdraw US troops from Syria.

On Monday, the Pentagon will hold a government-wide call between Mattis and Shanahan to mark the transition of power at the Defense Department.

A defense official said the call is meant “to ensure all members within the government know who is in command” and is “a courtesy and a mark of respect for the incoming Secretary of Defense.”

A former corporate executive, Shanahan’s portfolio at the Department of Defense has been narrow, with no experience in international affairs or counterterrorism. As 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.

CNN’s Barbara Starr contributed to this report.