Tensions have exploded in recent days between President Trump and a batch of current and former military officials who are critical – to varying degrees – of how he's handled the unrest in the wake of George Floyd's death in the custody of the Minneapolis Police Department.

The officials, including Trump's current Secretary of Defense Mark Esper, his former Secretary of Defense Jim Mattis and several others, have either implicitly broken with Trump in statements on policy or explicitly denounced his leadership — and Trump has fired back.

"Probably the only thing Barack Obama & I have in common is that we both had the honor of firing Jim Mattis, the world’s most overrated General," Trump said in a pair of tweets Wednesday night. "I asked for his letter of resignation, & felt great about it. His nickname was 'Chaos', which I didn’t like, & changed to 'Mad Dog.'"

Despite his claim, Trump did not give Mattis that nickname on his own. He has been referred to as "Mad Dog" as far back as 2004.

TRUMP FIRES BACK AFTER MATTIS CONDEMNS HIS 'MOCKERY' OF THE CONSTITUTION: 'GLAD HE IS GONE'

Trump added: "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!"

Trump was reacting to an extraordinary rebuke from Mattis that was published by The Atlantic.

"I have watched this week’s unfolding events, angry and appalled," Mattis said. "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."

And Mattis is far from the only military figure to contradict Trump in recent days. John Allen, a former four-star Marine general and current president of the Brookings Institution, a D.C. think tank, wrote an op-ed for Foreign Policy Thursday morning excoriating Trump for his actions on Monday, which included a photo-op at St. John's Episcopal Church near the White House.

The area around the church had moments before been forcibly cleared of protesters, though there are conflicting claims over the tactics used.

ESPER SAYS HE OPPOSES USING INSURRECTION ACT TO SEND MILITARY TO QUELL UNREST

"[I]in a bid to create some appearance that he can empathize with those demonstrating peacefully in the streets, the president proclaimed himself the 'ally of peaceful protesters,'" Allen wrote. "But, at that very moment, just a few hundred feet away across Lafayette Park, fully equipped riot police and troops violently, and without provocation, set upon the peaceful demonstrators there, manhandling and beating many of them, employing flash-bangs, riot-control agents, and pepper spray throughout."

Allen added that if the U.S. is to come out of the current turbulence a better country, it cannot look to the president for leadership, but must look to the protesters and people like George Floyd's brother, Terrance.

"So mark your calendars — this could be the beginning of the change of American democracy not to illiberalism, but to enlightenment," he said. "But it will have to come from the bottom up. For at the White House, there is no one home."

Meanwhile, Esper on Wednesday said that he opposes using the Insurrection Act, or active-duty military, to handle rioters, undercutting the president, who has indicated he is considering invoking the law.

GEN. JOHN ALLEN, ANTI-ISIS ENVOY UNDER OBAMA, RIPS TRUMP IN FOREIGN POLICY OP-ED

"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."

Later in the day, White House press secretary Kayleigh McEnany was asked about Esper's comments and did not exactly give a ringing endorsement.

"As of right now, Secretary Esper is still Secretary Esper and should the president lose faith, we will all learn about that in the future," she said.

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

Former Joint Chiefs of Staff Chairman Mike Mullen also wrote in The Atlantic this week decrying the government's actions that set the stage for Trump's Monday photo-op at St. John's.

All of this comes as the government has gone back-and-forth on bringing active-duty troops back to their bases after deploying them near Washington, D.C., to help quell the unrest. Esper, after a meeting at the White House Wednesday, reversed a decision that would have sent members of the U.S. Army's 82nd Airborne Division back to their base at Fort Bragg in North Carolina, instead keeping them near D.C. for the time being. This despite the Army reportedly being anxious to return its troops to their base.

Some current and former military leaders have said they are angry about the military allegedly being used as a prop by Trump in his mission to show that he is taking a tough stance against rioters.

CLICK HERE TO GET THE FOX NEWS APP

The combustible atmosphere surrounding the racial protests and riots, stoked by tensions between Trump and current and former military leaders, has the president hitting back. Not only did he excoriate Mattis in a pair of tweets Wednesday night, but he also tweeted or retweeted multiple posts defending his handling of the crisis and slamming the media and rioters during a Thursday morning tweetstorm.

The tensions between the president and the military figures come as a letter was circulated by Joint Chiefs of Staff Chairman Mark Milley Wednesday reminding military leaders about their oath to the U.S. Constitution.

"Every member of the U.S. military swears an oath to support and defend the Constitution and the values embedded within it. This document is founded on the essential principle that all men and women are born free and equal, and should be treated with respect and dignity," Milley wrote. "As members of the Joint Force – composed of all races, colors, and creeds – you embody the ideals of our Constitution. Please remind all of our troops and leaders that we will uphold the values of our nation, and operate consistent with national laws and our own high standards of conduct at all times."

Fox News' Jennifer Griffin and Ronn Blitzer contributed to this report.