A federal judge on Thursday temporarily enjoined Defense Secretary Pete Hegseth from officially censuring Sen. Mark Kelly over that Arizona Democrat's participation in a video reminding American military service members they have a right to refuse illegal orders.

Judge Rich Leon's order in U.S. District Court in Washington, D.C., also blocks Hegseth, for now, from reducing Kelly's U.S. Navy rank and pay, as punishment for his role in the video.

Kelly retired from the Navy as a captain.

The order came two days after news broke that the U.S. Attorney's Office for DC had tried, and failed, to get a federal grand jury to indict Kelly and Sen. Elissa Slotkin, D-Mich., who is a former CIA analyst, on criminal charges of seditious conspiracy related to their participation in the video released with four other members of Congress in November.

Leon, in a scathing opinion explaining his order, noted that Hegseth, in seeking to punish Kelly for his public statements as a member of Congress, relied "on the well-established doctrine that military service members enjoy less vigorous First Amendment protections given the fundamental obligation for obedience and discipline in the armed forces."