Former US Defense Secretary Mark Esper says in his newly released memoir that allies of President Donald Trump complained that he was "not loyal" after he did not back the president's 2020 allegations that the slain Iranian Maj. Gen. Qassem Soleimani had sought to attack four US Embassies, Business Insider reported.

In his new book, "A Sacred Oath: Memoirs of a Secretary of Defense During Extraordinary Times," Esper—who served under Trump as the Army's secretary from 2017 to 2019 and in his role as the Pentagon chief from 2019 until his November 2020 termination by the then-president—writes his intelligence briefings did not indicate that Soleimani was specifically eyeing four embassies.

While Esper writes he was concerned about attacks, he didn't feel comfortable backing up Trump's assertions, which he describes in the book—adding that the former president displayed a pattern of dishonesty.

"The simple fact was that Trump usually exaggerated and often made statements that could not be confirmed; others were outright fabrications. I became ensnared in one of those rhetorical webs on a Sunday morning talk show," the former defense chief writes.

Esper recalls in his book a January 2020 Fox News interview featuring Trump. The president made allegations that the ex-defense secretary says weren't included in CIA intelligence reports.

On January 10 that year, just days after Soleimani was killed by the US, "Trump told Fox News that Soleimani planned to attack several diplomatic posts in the Middle East, remarking, 'I can reveal that I believe it probably would've been four embassies,'" he writes.

"Not long before that, Pompeo had told the media the United States didn't know when or where the attacks might occur, but acknowledged that embassies were threatened," he adds.

"This was consistent with my understanding of the intelligence, the reports I was receiving, and precautionary actions we were taking," Esper says.

"Embassy Baghdad was obviously under threat, and State had enough concerns about Embassy Beirut that we reinforced that site as well. In addition, as I mentioned earlier, the safety of our embassies in Kuwait and Bahrain concerned me."

The former defense secretary reiterates in the book that while he agreed that there were clear threats against embassies, Trump's claims about the four sites couldn't be supported, according to reports that intelligence officials had seen.

"I didn't recall any specific mention of four sites in my briefings and reports from the CIA," he writes. "Therefore, when I first appeared on CNN on Sunday, January 12, I made two things clear: first, that I hadn't seen any specific evidence with regard to the targeting of four embassies; and second, that I still believed there were threats against multiple embassies, noting that we had reinforced earlier diplomatic posts."

He adds: "Regardless, my unwillingness to affirm Trump's specific claim that the intelligence said Soleimani targeted four embassies plunged me into hot water with the president.

"A trusted colleague told me that some of Trump's friends called to report on me, complaining that I was 'undermining' him and 'not loyal,' and even suggested he 'fire Esper' ... for being honest."

Soleimani was killed by a US drone strike near Iraq's Baghdad International Airport in January 2020. Trump was adamant that the threat to multiple embassies forced his hand in ordering the strike that took down the longtime Iranian security and intelligence commander.

The Trump administration never publicly provided clear evidence to support its claim that Soleimani posed an imminent threat to US personnel in the region and offered shifting justifications for the strike in the aftermath as congressional lawmakers questioned its legality.