Sooner or later, advisers in President Donald Trump's orbit all come to learn the same unwritten rule: no one can outshine the boss.

Kristi Noem, the secretary of the Department of Homeland Security, became the latest reminder of that on Thursday when Trump announced he was removing her from her post as the face of the administration's crackdown on immigration.

Noem will be replaced by Oklahoma Senator Markwayne Mullin at the end of the month, Trump said in a post on Truth Social. He said Noem would move to a new job as special envoy for a new US security initiative in the Western Hemisphere called The Shield of the Americas.

"I thank Kristi for her service at "Homeland",' Trump said.

It ends Noem's controversial tenure at the top of the department, which is tasked with carrying out the president's sweeping immigration agenda.