Updated

President Trump on Monday said he fired Secretary of Defense Mark Esper and that Christopher Miller, the director of the National Counterterrorism Center, will take over as acting defense secretary "effective immediately."

“Mark Esper has been terminated,” Trump tweeted, his first ousting of a Cabinet official since the election was called for Democratic nominee Joe Biden. “I would like to thank him for his service.”

A senior U.S. official told Fox News that White House chief of staff Mark Meadows called Esper and let him know he was being fired before the president’s tweet.

Fox News has learned that Esper was involved in meetings at the Pentagon Monday morning, and was behaving as defense secretary. Sources told Fox News that the president's announcement caught some of his staff off guard. 

TRUMP 'NOT BACKING DOWN,' CAMPAIGN MANAGER SAYS

Recently, there have been reports that Esper could be removed from his post or could be preparing resignation letters, but some members of his staff believed that he would remain through inauguration. 

Esper's firing comes five months after he said he did "not support invoking the Insurrection Act," amid nationwide protests over the summer. He has not held a press conference in the Pentagon briefing room since July. 

"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 in June. "We are not in one of those situations now. I do not support invoking the Insurrection Act."

FILE - In this July 10, 2020, file photo Defense Secretary Mark Esper speaks during a briefing on counternarcotics operations at U.S. Southern Command in Doral, Fla. Esper plans to fly nearly halfway around the world this week to tiny Palau, which no Pentagon chief has ever visited. (AP Photo/Evan Vucci, File)

The president said Miller would immediately become acting secretary of defense.

"I am pleased to announce that Christopher C. Miller, the highly respected Director of the National Counterterrorism Center (unanimously confirmed by the Senate), will be Acting Secretary of Defense, effective immediately," Trump said. 

WASHINGTON, DC - SEPTEMBER 24: National Counterterrorism Center Director Christopher Miller testifies at a Senate Homeland Security and Governmental Affairs Committee hearing on "Threats to the Homeland" on Capitol Hill on September 24, 2020 in Washington, DC. (Photo by Joshua Roberts-Pool/Getty Images)

The president added: "Chris will do a GREAT job!" 

CLICK HERE TO GET THE FOX NEWS APP

Miller was sworn in as the seventh director of the National Counterterrorism Center in August, after serving as deputy assistant secretary of defense for special operations and combating terrorism.

From 2018 to 2019, Miller served as the special assistant to the president and senior director for counterterrorism and transnational threats at the National Security Council responsible for strategic-level policy making and implementation.

Miller also served in the military from 1983 to 2014, beginning in the Army Reserve, and later transferred to Special Forces. Miller participated in combat operations in Afghanistan in 2001 and Iraq in 2003 with the 5th Special Forces Group (Airborne,) and many follow-on deployments to both theaters.

Fox News' Jennifer Griffin, Lucas Tomlinson and Gillian Turner contributed to this report.