House Speaker Nancy Pelosi got in trouble Tuesday for calling President Donald Trump’s racist tweets “racist.” It turns out there’s a congressional rule that lawmakers can’t accuse a sitting president—or any member of the House or Senate—of racism on the floor. Pelosi was even briefly prohibited from speaking at all from the floor after the parliamentarian ruled her remarks criticizing Trump’s tweets were out of order.

“These comments from the White House are disgraceful and disgusting and those comments are racist,” she said at the lectern during debate on a resolution to condemn Trump’s weekend tirade targeting four left-wing Democratic congresswomen of color, saying they should “go back” to where they came from. Pelosi also called the president’s defense of his words “shameful.”

Republican Rep. Doug Collins cited the rule and asked the speaker to rephrase her comments or to take them back—but Pelosi’s refusal to do either had GOP lawmakers on the floor up in arms, and the House descended into parliamentary pandemonium. The Republicans—who’ve largely refused to call the tweets racist—wanted the words stricken from the record.

The rule Republicans tried enforcing to silence Pelosi is actually centuries old, written by a slave-owning founder and distilled from centuries of British parliamentary procedure. It’s part of the Jefferson Manual of Parliamentary Practice, a book of decorum and procedure for legislative proceedings crafted by Thomas Jefferson back when he oversaw the Senate as vice president. The House uses an updated, annotated version of that manual, and it includes this rule that Jefferson took from English parliamentary rules: “In Parliament, to speak irreverently or seditiously against the King is against order.”

The idea is that you can’t disparage the president on the House floor—it would violate decorum and slow things down. “It is very material that order, decency, and regularity be preserved in a dignified public body,” Jefferson wrote in his manual. The U.S. Congress has, over time, interpreted that rule to mean that “personal abuse, innuendo, or ridicule” of the president is prohibited. Precedential rulings in the House have long held calling the president a “liar,” “amoral,” or a “crook” are also against House rules.

5/ That, in turn, has been interpreted to prohibit calling the president a racist. pic.twitter.com/sVuQtnvZIi — Josh Chafetz (@joshchafetz) July 16, 2019

The current version of the manual cites numerous examples beginning in 2016 and 2017, when accusations of racism and racist behavior against the president-elect and then president were ruled out of order. Those rulings—from years when Republicans still held majorities in both houses of Congress—declared it out of order to accuse the president of “racial or other discrimination” on the floor. As such, members in the chamber can’t call the president “racist,” “misogynist,” or a “bigot” and can’t accuse him of having used “racial slurs” or “racial epithets.” The rule also protects presidents-elect from accusations like these. One can imagine how this might have come up regarding Donald Trump.

A vote to remove Pelosi’s words from the record eventually failed, but had the House not voted to restore her speaking privileges, she would have been barred from speaking on the floor for the rest of the day. Apparently, the official congressional punishment for calling out racism is worse than the punishment for actually doing something racist. Still, the resolution—the title of which probably couldn’t be read aloud without violating the rules—ended up passing.