MINNEAPOLIS — Rep. Ilhan Omar’s marriage appears to be headed for the rocks, a longtime friend of the couple told The Post.

The congresswoman’s husband, Ahmed Hirsi, the source said, is poised to file for divorce after the revelation in a bombshell court filing that she allegedly had an affair with DC political consultant Tim Mynett.

The Minnesota congresswoman and her husband allegedly separated in March, and Omar asked Hirsi to divorce her around that time because she didn’t want to file the papers — but Hirsi refused, telling her if she wanted a divorce she should do it herself, said the source, who has known both parties for 20 years.

The husband allegedly changed his mind after Tim Mynett’s wife last week filed bombshell divorce papers claiming her spouse was having an affair with the Somali-born US representative — with Hirsi said to be angry he had been made to look the fool by the allegations of an extramarital affair.

“I’m surprised he hasn’t filed already,” the source told The Post, adding that Hirsi was “very confused” in the wake of the bombshell allegations but still loved his wife and was reluctant to expose their three children to a public divorce battle.

The freshman congresswoman, 37, insisted she and Hirsi, 39, were still together and denied the charge she was dating Mynett in an interview with CBS affiliate WCCO on the day of the Aug. 27 report.

But the pair have been living apart since March — around the same time she was spotted having dinner with Mynett at a California restaurant — with Omar moving into a luxury condo in downtown Minneapolis and their split an “open secret” in town, the source said.

The family home they shared in the Cedar-Riverside neighborhood — nicknamed “Little Mogadishu” for its large Somali population — appears to be abandoned, with the curtains drawn and cobwebs growing over the front porch when a Post reporter visited last week.

Hirsi, a senior policy aide to a Minneapolis city councilwoman, is reportedly bouncing between friends’ houses and stays at the luxury condo when Omar isn’t in town, with the kids also spending time with a grandfather, the source said.

Omar and Hirsi were first engaged in 2002. But the duo never legally married; instead, they wed in a traditional Muslim ceremony and had two children before splitting up in 2008, Omar has said.

The next year, she married Ahmed Nur Said Elmi, whom she described as a “British citizen,” records show. They split up in 2011 and Omar and Hirsi got back together and had a third child in 2012, records show.

In 2017, Omar finally officially divorced Elmi. She legally wed Hirsi the next year. But they began experiencing marital problems shortly after Omar assumed office, said the source.

Hirsi was said to be unhappy with his wife’s constant travel as a member of “the Squad,” a group of far-left-leaning female freshman House members, leaving him the primary caregiver to three children aged between 7 and 16.

In April, Hirsi shared happy photos of a family vacation in Miami on social media — Omar notably absent — captioning the snaps with cryptic messages about new beginnings.

“Nothing brings about more positive change than difficulties,” he captioned one family photo.

Meanwhile, public documents obtained by The Post raise discrepancies in the timeline of Omar’s marriages to Hirsi and Elmi.

Documents suggest Omar never stopped living with Hirsi — even after they ended their religious marriage and she was legally married to Elmi. In February 2009, when Omar legally married Elmi, she listed their marital address as a property in Columbia Heights, a suburb in Minneapolis.

However, just three months later, Hirsi used the same Columbia Heights property as his personal address on business filings for his One on One Cafe Lounge.

Two months later in August 2009, Omar began studying political science at North Dakota State University.

Omar and Hirsi moved to North Dakota together with their two children, according to a 2013 article in Twin Cities Daily Planet, even though she was supposed to be estranged from Hirsi and married to Elmi.

In traffic violations from 2008 to 2012 — the entire time Omar was married to Elmi — the congresswoman and Hirsi also listed their address as the family home in Cedar-Riverside, suggesting they never stopped living together.

When Omar and Elmi separated in 2011, the congresswoman claimed she couldn’t get in touch with Elmi to divorce him because he’d moved to the UK and she didn’t know where he was.

In divorce papers asking to dissolve their marriage by alternate means in 2017, Omar swore under penalty of perjury that she had no means of contacting Elmi and his last known location was London in June 2011.

But lease and eviction records suggest Elmi was in the US the whole time — living just 2.6 miles away from her at an apartment in downtown Minneapolis.

Elmi rented the apartment in September 2011 but was evicted in July 2012 for failing to pay his rent.

A month after Omar filed the divorce papers claiming she had no idea where Elmi was, he was busted in Minneapolis for driving on a cancelled license — listing his address at another apartment in Eden Prairie, Minnesota.

Omar and Elmi’s divorce was finalized in December 2017, and Omar married Hirsi a month later in January 2018.

The congresswoman has refused to comment on both the affair allegations and the discrepancies in her marriages — dodging questions from a Post reporter at an event in Minneapolis last week.

Tim Mynett and his E. Street Group received about $230,000 from Omar’s campaign for travel expenses, fundraising consulting, communications and more — a possible ethics violation.

Mynett denied the bombshell affair allegations in a counterclaim filed in DC Superior Court — accusing his wife of waging a campaign to “ruin his career” after he left their unhappy marriage.