Footage of Mattis' off-the-cuff remarks was posted to a Facebook page titled "U.S. Army W.T.F! Moments," a group that focuses on Army-related news and entertainment stories.
"You're a great example for our country right now and it's got problems," Mattis says in the video. "You know it and I know it. It's got problems we don't have in the military. And you just hold the line, my fine soldiers, and sailors and airmen and Marines."
Mattis' remarks, which were made in Jordan, according to the site's administrator, were posted in the wake of a tumultuous week in the United States following the white supremacist rally in Charlottesville, Virginia, and fallout from President Donald Trump's response. It's unclear when exactly Mattis made the comments, though Mattis traveled to Turkey, Ukraine and Jordan last week.
In the video, Mattis begins by introducing himself to a small group. "To those of you I don't know, I'm Mattis. And I work in the Department of Defense," he says. Troops who spotted Mattis gathered around to hear the unscripted motivational speech.