WASHINGTON — A newly diverse House of Representatives has passed a rule that, for the first time in 181 years, allows head coverings to be worn on the House floor for religious reasons.

The rules package passed 234-197 Thursday and included a number of provisions, among them several seeking to “restore inclusion and diversity.” It passed the same day the country’s first two female Muslim members of Congress took office– Rashida Tlaib of Michigan and Ilhan Omar, a Minnesota lawmaker who wears a head covering. Both women are Democrats.

Omar celebrated the change on Twitter:

“Congress voted to lift a 181-year ban on headwear to make the #116thCongress more inclusive for all. I thank my colleagues for welcoming me, and I look forward to the day we lift the Muslim ban separating families all over the U.S. from their loved ones.”

The ban on head coverings has been in place since 1837, The Post’s history blog Retropolis reported Friday.

According to the Web page of the House historian, the 1837 measure passed with weirdly little debate, considering efforts to keep heads bare had been going down in flames for years.

Some opponents of the ban before 1837 argued that there was nowhere for men (no women in office then, obviously) to put their hats. Others said wearing hats showed connection to the British House of Commons, where lawmakers wore hats during debate to reflect their independence from the King of England.

House historians told Retropolis that French diplomat Alexis de Tocqueville was struck by the general lack of decorum of the U.S. House in the early 1800s.

“One is struck by the vulgar demeanor of that great assembly,” de Tocqueville wrote. Members used chewing tobacco and spat, smoked cigars, carried weapons, swilled liquor and propped their feet on their desks.

This week, the argument in favor of lifting the ban was different. It was proposed last month by then-House Democratic Leader Nancy Pelosi, D-Calif., Rules Committee ranking Democrat Rep. Jim McGovern of Massachusetts and Omar, of Minnesota.