Republican lawmakers blasted President Biden online after the military removed a Space Force commanding officer for speaking out against critical race theory and Marxism in the military.

Several prominent GOP lawmakers threw their support behind Lt Col. Matthew Lohmeier, the Space Force commanding officer who was relieved of duty Friday for decrying Marxist ideologies and critical race theory, which he said are gaining influence in the military, on a recent podcast.

Rep. Dan Crenshaw, R-Texas — himself a former Navy SEAL — said the military needs to prepare service members for combat and told social media users to not let the story "slip away."

"We need to be preparing our warriors to fight and win battles, not how to be SJWs," Crenshaw wrote. "Far left critical race theory is taught while speaking out against MARXISM is punished??"

SPACE FORCE OFFICER LOST LEADERSHIP POST AFTER DENOUNCING CRITICAL RACE THEORY, MARXISM

"Share this," he added. "Don’t let this story slip away."

Rep. Byron Donalds, R-Fla., dubbed Lohmeier a "hero" for both his military service to America and defending the rights of the "leftist mob" trying to cancel him.

"Lt. Col. Matthew Lohmeier is a hero, not only for putting on the uniform every day to defend our nation but also to defend the freedoms of the leftist mob attempting to cancel him," Donalds said. "[Critical race theory] should have no place in our classrooms, Armed Forces, or country as a whole."

Donalds’ fellow House member Rep. Andy Biggs, R-Ariz., echoed the Florida Republican’s sentiment of Lohmeier as a "hero," writing the US military "should be preparing to win battles - not being brainwashed with Marxist ideals."

NAVY’S ‘EXTREMISM’ TRAINING SAYS IT’S OK TO ADVOCATE FOR BLM AT WORK BUT NOT ‘POLITICALLY PARTISAN’ ISSUES

Several other Republicans came to the defense of Lohmeier, with Rep. Dan Bishop, R-N.C., pointing out that Lohmeier was "punished for telling the truth" about Marxism and critical race theory.

Lohmeier was the commander of 11th Space Warning Squadron at Buckley Air Force Base Colorado and was relieved from his post by Lt. Gen. Stephen Whiting, who said he had lost confidence in Lohmeier’s ability to lead after the podcast appearance.

"Lt. Gen. Whiting has initiated a Command Directed Investigation on whether these comments constituted prohibited partisan political activity," a Space Force spokesperson said.

According to US military code, service members are prohibited from expressing their personal political opinions while in uniform but can do so while off duty.

CLICK HERE TO GET THE FOX NEWS APP

During his appearance on the "Information Operation" podcast last week, Lohmeier blasted Gen. Lloyd Austin’s "agenda" of diversity and inclusion.

"The diversity, inclusion and equity industry and the trainings we are receiving in the military ... is rooted in critical race theory, which is rooted in Marxism," Lohmeier said.