Defense Secretary Jim Mattis is a legendary and highly quoted Marine general who led the US military for two tumultous years before quitting in protest over differences with President Donald Trump.

In his stunning resignation letter Thursday, the revered retired general rebuked Trump for devaluing America's alliances and not being more clear about American adversaries like Russia.

"My views on treating allies with respect and also being clear-eyed about both malign actors and strategic competitors are strongly held and informed by over four decades of immersion in these issues," he wrote in the letter.

Mattis, 68, is a seasoned national security leader who spent more than four decades in uniform. He was seen as a institutional leader who moderated many of Trump's impulses, from using armed troops to stop migrants at the US-Mexico border to pulling thousands of troops long-stationed in countries like Germany and South Korea.

Read more: US allies and adversaries are in shock and bracing for an unchecked Trump as Mattis resigns

Mattis is a legendary figure in the US military. Viewed as a warrior among Marines and respected by members of other services, he has been at the forefront of numerous engagements.

If you look back on his storied 44-year career leading Marines in battle, and the many colorful quotes he has given over the years, it's pretty easy to see why.

Read more: Mattis' departure leaves Trump unleashed to to enact his wildest military visions

We've gathered some of Mattis' best sayings, taken from this San Diego Union-Tribune profile (archived with the Wayback Machine) unless otherwise specified.

Geoffrey Ingersoll contributed reporting on a previous version of this article.