Then-President Donald J. Trump answers a reporter's question as he participates in a briefing with senior military leaders in the Cabinet Room of the White House in Washington, DC, on October 7, 2019.
Washington CNN  — 

Chairman of the Joint Chiefs of Staff Gen. Mark Milley told former Defense Secretary Mark Esper he was “this close” to resigning on the spot after a contentious Oval Office meeting with then-President Donald Trump in the summer of 2020.

The exchange, detailed in Espers’ new book “A Sacred Oath,” occurred after protests over the police killing of George Floyd broke out in front of the White House in Lafayette Park. It marks one of several stunning discussions recounted in the book, which is set to publish Tuesday and portrays a chaotic White House focused almost entirely on Trump’s reelection bid.

Trump, angry with the situation at the time, called Milley asking for “ten thousand troops” to be deployed to the streets of Washignton, Esper wrote. After receiving this phone call, Milley informed Esper of the conversation. Milley’s face, Esper said, was “ashen,” as he relayed the conversation with Trump.

The next day, Trump reportedly called Esper and Milley to the White House for a meeting about the protests. Esper, who does not describe in his book what was said in the meeting, called it “loud, contentious, and unreal.” Afterward, Milley told Esper he was “this close” to resigning on the spot, Esper claims.

The office of the Chairman of the Joint Chiefs of Staff declined to comment.

According to Esper, Trump also raised the idea of shooting protesters who took to the streets around the White House after Floyd’s death. Speaking with CNN’s Anderson Cooper on “AC360” Monday night, Esper said he had been “dumbstruck” and “shocked” to hear Trump make the suggestion.

According to the book, Esper and Milley were able to convince the then-President to avoid a “terrible outcome – the one that Trump wanted – but we were shaken.”

Esper told Cooper he had also been on the brink of resigning but that his West Point training that engrained “duty, honor and country” kept him from doing so.

“I thought the best thing for me to do for the country was to serve. The best thing for me would have been to quit,” he told Cooper before adding that he was also concerned about who would have replaced him in the role.

“I don’t think the President was well served by some people he brought around him and unfortunately, he kept attracting people like that,” the former secretary said Monday.

Esper said he felt Trump became more emboldened after he was acquitted by the Senate in his first impeachment trial and brought in loyalists – like former acting director of national intelligence Richard Grenell and former chief of staff Mark Meadows – who, he said, took “outlandish ideas to a new level.”

The Republican Party, Esper told Cooper, must “move beyond” Trump and look for “the next generation of leaders.”

CNN’s Zachary Cohen contributed to this report.