In a fitting tribute to his tenure as Secretary of Defense, James Mattis found himself at the butt-end of an oblique twitter attack launched by his soon-to-be-former boss on Monday. In a series of early morning tweets, Trump castigating the "failed generals" who opposed his decision to pull US troops from Syria and Afghanistan.

But as Mattis prepares to hand over control of the Department of Defense to Patrick Shanahan, a former Boeing executive with no government or political experience, Mattis served up some criticism of his own in a farewell letter to DoD employees where he quoted Abraham Lincoln and urged the department to "hold fast", saying that the Department of Defense is "at its best when the times are most difficult."

According to the Associated Press, the one-sentence quote used by Mattis came from a telegram sent by President Abraham Lincoln to Gen. Ulysses S. Grant, the commander of Union forces, on Feb. 1, 1865, during the final weeks of the Civil War. It read: "Let nothing which is transpiring, change, hinder, or delay your military movements, or plans."

Mattis was initially supposed to depart in February to give Trump time to find a replacement, but after angering the president with his criticism of his decision to pull troops out of Syria, Trump decided to push him out before the end of the year.