FILE - Defense Secretary Jim Mattis talks to U.S. troops at Guantanamo Bay, Cuba, Dec. 21, 2017.
FILE - Defense Secretary Jim Mattis talks to U.S. troops at Guantanamo Bay, Cuba, Dec. 21, 2017.

WASHINGTON - Outgoing U.S. Defense Secretary Jim Mattis is giving some final advice to troops and the Defense Department's civilian employees – maintain your faith in America and continue to stand by the country's allies.

"Our Department's leadership, civilian and military, remains in the best possible hands," Mattis wrote in his official farewell message Monday, his last day on the job.

"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," he continued. "So keep the faith in our country and hold fast, alongside our allies, aligned against our foes."

Monday's letter comes as Mattis prepares to relinquish his office to Deputy Secretary Pat Shanahan, who will become acting defense secretary as of January 1.

FILE - Deputy Defense Secretary Patrick Shanahan i
FILE - Deputy Defense Secretary Pat Shanahan is pictured at the Pentagon, Feb. 2, 2018.

Unlike Mattis, who came to the Pentagon as a revered former Marine general who served in Afghanistan, Shanahan does not have any military experience. Shanahan came to the Defense Department from aviation giant Boeing, where he spent more than 30 years overseeing both civilian and military related programs. Shanahan was named deputy secretary in 2017.

Mattis resigned on December 20 following a White House meeting with Trump during which the two men disagreed over the president's decision to withdraw all U.S. troops from Syria, where they have been helping in the fight against the Islamic State terror group.

FILE - President Trump gets a briefing from his senior military leaders, including Defense Secretary James Mattis (L), in the Cabinet Room at the White House, October 23, 2018.
Differences With Trump's Views Prompted Mattis Departure
US secretary of defense announced he was quitting, personally handing his letter of resignation to president following a lunch meeting at the White House

While it was not the first time the two men disagreed on policy, for Mattis the Syria decision represented a breaking point.

"You have the right to have a Secretary of Defense whose views are better aligned with yours on these and other subjects," Mattis wrote to Trump at the time, adding he would stay on until the end of February 2019 to allow time for a successor to be found and so that he could represent the U.S. at a NATO Defense Ministerial meeting.

Stressing alliances

Mattis also warned the president that the U.S. "must be resolute and unambiguous in our approach to countries whose strategic interests are increasingly in tension with ours," naming both China and Russia.

FILE - U.S. Secretary of Defense Jim Mattis gives a news conference after a NATO defense ministers meeting at the Alliance headquarters in Brussels, Belgium, June 29, 2017.
NATO Allies Fearful About Departure of 'Trusted' Mattis  
For two years, U.S. Defense Secretary Jim Mattis has been urging nervous NATO counterparts to judge the Trump administration by its actions and not by the president's tweets or off-the-cuff remarks. But on Thursday, President Donald Trump posted a tweet the Europeans couldn't ignore: an announcement that the four-star general would soon be leaving the Pentagon.  The tweet wasn't altogether a surprise, coming a day after Trump ordered U.S. ground troops out of northern Syria, but it has shocked America…

And he further warned that the United States could not afford to alienate allies.

"Our strength as a nation is inextricably linked to the strength of our unique and comprehensive system of alliances and partnership."

Three days later, Trump announced via Twitter that Mattis would be leaving at the end of the year.

According to Pentagon officials, Mattis' departure, at his own request, will not be marked by any of the fanfare normally seen to pay respect to an outgoing defense secretary.

FILE - In this April 9, 2018 photo, Deputy Secretary of Defense Patrick Shanahan, right, listen as President Donald Trump speaks during a cabinet meeting at the White House, in Washington.
Trump to Replace Pentagon Chief Mattis 2 Months Early With Deputy
President Donald Trump said Sunday that Deputy Defense Secretary Patrick Shanahan will become the acting Pentagon chief on January 1, replacing Defense Secretary Jim Mattis, who announced his resignation last week."I am pleased to announce that our very talented Deputy Secretary of Defense, Patrick Shanahan, will assume the title of Acting Secretary of Defense starting January 1, 2019," Trump tweeted, moving to push current Defense Secretary Mattis out of his post two months early.I am pleased to…

Instead, the handover of authority from Mattis to acting Defense Secretary Shanahan will marked by a phone call, alerting all relevant government agencies to the change in command.

Shortly after the Pentagon released Mattis' farewell message Monday, the Trump took to Twitter.

"I am the only person in America who could say that, "I'm bringing our great troops back home, with victory," and get BAD press," he wrote.

Mattis began his last message as secretary of defense by quoting from a telegram U.S. President Abraham Lincoln sent to Gen. Ulysses Grant in 1865, just over two months before the end of the U.S. Civil War.

"Let nothing which is transpiring, change, hinder or delay your military movements, or plans," it read.