U.S. President Donald Trump said Monday that he has fired Defense Secretary Mark Esper, making him the latest top aide to be ousted from the administration as it nears an end following the defeat of the incumbent in last week's presidential election.

"Mark Esper has been terminated. I would like to thank him for his service," Trump tweeted. He said he has appointed Christopher Miller, director of the National Counterterrorism Center, as acting defense secretary.

Supplied photo shows U.S. Defense Secretary Mark Esper  (L) at a meeting with Japan's Defense Minister Taro Kono in Guam on Aug. 29, 2020. (Photo courtesy of Japan's Defense Ministry)(Kyodo)

Esper, 56, took up the post in July last year, ending an unprecedented period of senior-level instability at the Pentagon following the resignation of Jim Mattis in December 2018. Mattis stepped down over a series of policy disputes with Trump, most notably over Syria.

The relationship between Trump and Esper is widely believed to have been strained after the defense chief in June publicly opposed the president's idea of deploying the military to quell civil unrest sparked by the police killing of a black man the previous month.

NBC News reported last Thursday that Esper had prepared a letter of resignation, as he was long expected to be pushed out after the election, citing three current defense officials. U.S. media on Saturday called the election for Democratic challenger Joe Biden, an outcome Trump still has not accepted.

The television network also said Esper was helping members of Congress draft legislation that would strip the names of Confederate leaders who supported slavery during the U.S. Civil War from military bases in a move that could put him further at odds with Trump.

Esper, an Army veteran, was also thinking about his legacy, having earned the nickname "Yesper" from lawmakers and White House officials for, in their view, his willingness to implement Trump's agenda without pushing back, according to NBC.

"He cares about his legacy and prefers to be remembered as someone who was fired because he stood up to the president, rather than being remembered as 'Yesper,'" one defense official was quoted as saying.

During his four years in office, Trump also sacked top aides such as John Bolton, who was his national security adviser, and Rex Tillerson, who was secretary of state.