WASHINGTON — It’s taken 181 years, but the House of Representatives is finally getting around to changing a rule that bans hats on the floor.

The ban was enacted in 1837 by members who wanted to break from the hat-wearing tradition in British Parliament.

They didn’t anticipate Ilhan Omar.

The Minnesota Democrat is one of two Muslim women elected this year and she’s the first to wear a hijab.

A Democratic source said the rules will be clarified to allow religious headwear, as well as coverings for medical reasons.

“There are those kinds of policies that oftentimes get created because people who have blind spots are in positions of influence and positions of power,” Omar told The Post Thursday.

“I think it will be really exciting to see the stuff that we notice within the rules that don’t work for a modern-day America.”

Rep. Bonnie Watson Coleman also praised the changes. The New Jersey Democrat had a tumor successfully removed and has undergone chemotherapy since September to ensure she’s cancer free.

The treatment caused her hair to fall out. She wears a hat outside, but when she votes on the House floor she takes it off.

“I just have a bald head and I’m somewhat getting used to it hoping that it’s a very temporary thing,” Watson Coleman told The Post.

“I don’t think I would start wearing a (hat) now, but I recognize that if someone else has the same issue and wants to, they should be able to.”

The record-breaking class of women — more than 100 compared to 84 House females now in office — still represents just a fraction of the 435-person House membership.

There’s been incremental changes along the way.

When Nancy Pelosi became speaker in 2007, she installed rooms for nursing moms.

Under Speaker John Boehner’s leadership, female reps finally got a bathroom off the House floor.

And under Speaker Paul Ryan, a rule that barred bare arms on the House floor and in the Speaker’s Lobby was no longer enforced. The ban adversely affected women in sleeveless dresses during the hot DC summer.

“It’s taken us this long to get less than a quarter of the House, but it’s still better than it was,” said Rep. Zoe Lofgren of California, who recalls being a congressional staffer in the 1970s and not being allowed to wear pants.

Lofgren, the incoming leader of the House Administration Committee, predicted once the hat barrier is broken, the bare arms rules will be officially changed, along with other outdated practices.

“As women join, those things will go,” Lofgren told The Post. “But it’s not the main policy issue. People sent these women here for health care.”

Rep. Pramila Jayapal of Washington state, a leader in the Congressional Progressive Caucus, said members are also discussing how the House can be more welcoming for new and single moms.

For Omar’s part, she’s in disbelief she even made it to the Capitol. She joins Rashida Tlaib of Michigan as the first Muslim women. She’s also the first Somali-American and first former refugee.

Asked if she feels like a trailblazer, Omar gets tearful as she speaks of joining icons like Pelosi, the first female House speaker, and Rep. John Lewis, the civil rights champion.

“I ran into Congressman John Lewis and I burst into tears and I said to him, ‘Sir, I read about you in middle school and you are here in the flesh and I get to be your colleague,’ ” Omar said. “I remember my dad telling me about us having the first woman speaker and I’m here serving with her as my colleague. And so there are moments every single minute that I’ve been here where I almost want to pinch myself to awaken to the reality of how privileged and honored I feel to be in a place where we are making history.”