Updated

James Mattis, who served as President Trump's first defense secretary, excoriated the president in a statement to The Atlantic published on Wednesday -- urging Americans to "reject and hold accountable those in office who would make a mockery of our Constitution."

Trump issued his own blistering condemnation on Twitter late Wednesday, pointing out that then-President Obama removed Mattis as head of U.S. Central Command in 2013.

"Probably the only thing Barack Obama and I have in common is that we both had the honor of firing Jim Mattis, the world’s most overrated General," Trump wrote. "I asked for his letter of resignation, & felt great about it. His nickname was 'Chaos', which I didn’t like, & changed it to 'Mad Dog.' His primary strength was not military, but rather personal public relations. I gave him a new life, things to do, and battles to win, but he seldom 'brought home the bacon'. I didn’t like his 'leadership' style or much else about him, and many others agree. Glad he is gone!"

Mattis has largely stayed out of the public eye since resigning in December 2018, when he opposed Trump's abrupt troop pullout from Syria. The retired Marine Corps general had said he wanted to give the administration an "opportunity" to govern, rather than criticize the president in the press.

On Wednesday, though, Mattis made clear that Trump's response to the nationwide protests over the in-custody death of George Floyd had spurred him to act.

Specifically, Mattis appeared to object to authorites' decision to clear away protesters in Washington D.C.’s Lafayette Park on Monday before Trump's visit to the historic St. John’s Church, which rioters had burned the previous night. The United States Park Police denied using tear gas to disperse the protesters, despite various media reports, and authorities have said they cleared the park because of violent outbursts and not to make room for Trump.

“When I joined the military, some 50 years ago,” Mattis wrote, “I swore an oath to support and defend the Constitution. Never did I dream that troops taking that same oath would be ordered under any circumstance to violate the Constitutional rights of their fellow citizens—much less to provide a bizarre photo op for the elected commander-in-chief, with military leadership standing alongside.”

President Donald Trump walks past police in Lafayette Park after visiting outside St. John's Church across from the White House Monday, June 1, 2020, in Washington. Part of the church was set on fire during protests on Sunday night. (AP Photo/Patrick Semansky)

More generally, Mattis took issue with Trump's efforts as a statesman and leader.

“I have watched this week’s unfolding events, angry and appalled,” Mattis wrote to the outlet. “The words ‘Equal Justice Under Law’ are carved in the pediment of the United States Supreme Court. This is precisely what protesters are rightly demanding. It is a wholesome and unifying demand—one that all of us should be able to get behind. We must not be distracted by a small number of lawbreakers. The protests are defined by tens of thousands of people of conscience who are insisting that we live up to our values—our values as people and our values as a nation.”

Mattis continued: “Donald Trump is the first president in my lifetime who does not try to unite the American people—does not even pretend to try. Instead, he tries to divide us. We are witnessing the consequences of three years of this deliberate effort. We are witnessing the consequences of three years without mature leadership. We can unite without him, drawing on the strengths inherent in our civil society. This will not be easy, as the past few days have shown, but we owe it to our fellow citizens; to past generations that bled to defend our promise; and to our children.”

Mattis' remarks were published hours after dissent appeared to be brewing anew in the Pentagon. Defense Secretary Mark Esper flatly told reporters that despite Trump's remarks earlier this week, he is not in favor of the president invoking the Insurrection Act in order to send the U.S. military to quell violent protests. Some top Republicans have also said the military should become involved given the scale of the riots overtaking major U.S. cities.

"The option to use active-duty forces in a law enforcement role should only be used as a matter of last resort and only in the most urgent and dire situations," Esper said. "We are not in one of those situations now. I do not support invoking the Insurrection Act."

In his statement to The Atlantic, Mattis also took aim at Esper, directly criticizing Esper's recent call for governors to "dominate the battlespace."

Former U.S. Secretary of Defense Jim Mattis listens to a question during his appearance at the Council on Foreign Relations, in New York, Tuesday, Sept. 3, 2019. (AP Photo/Richard Drew)

SECRET SERVICES AGENTS WOUNDED; TRUMP RUSHED TO BUNKER UNDERNEATH WHITE HOUSE

"We must reject any thinking of our cities as a ‘battlespace’ that our uniformed military is called upon to ‘dominate,'" Mattis wrote. "At home, we should use our military only when requested to do so, on very rare occasions, by state governors. Militarizing our response, as we witnessed in Washington, D.C., sets up a conflict—a false conflict—between the military and civilian society. It erodes the moral ground that ensures a trusted bond between men and women in uniform and the society they are sworn to protect, and of which they themselves are a part. Keeping public order rests with civilian state and local leaders who best understand their communities and are answerable to them."

Mattis' remarks drew mixed reactions. Former Missouri Democratic Sen. Claire McCaskill tweeted: "Mattis. Finally. But with eloquence that should wake up many who are in a political coma. He was a warrior for our nation. This will have a big impact on our military. And hopefully on Republican elected officials who have mountains of respect for him."

CLICK HERE TO GET THE FOX NEWS APP

"Mattis resigned in protest because Trump wanted to withdraw troops from Syria," countered journalist Michael Tracey. "He has no moral high ground."

"It is a good time to recall, as well, that pretty much our entire media and military pundit class pushed to keep troops in Syria on the grounds that their withdrawal would lead to the *immediate* genocide of Kurds," wrote The Federalist's Mollie Hemingway. "That didn't happen. A few days later, they dropped the story."

Fox News' Ronn Blitzer contributed to this report.