A local judge granted a divorce Thursday to a D.C. doctor who accused Rep. Ilhan Omar of having an affair with her husband, in a court hearing that ended abruptly after the wife brought up the controversial Minnesota congresswoman.

Superior Court Judge Darlene Soltys had just applauded Beth and Tim Mynett for reaching a divorce settlement amicably when Beth Mynett spoke up.

“[Through] extensive documentation and his own words, Tim acknowledged he has been engaged in an extramarital romantic relationship with Ilhan Omar, which proceeded and precipitated the divorce,” Beth Mynett, a doctor and mother, said.

But Tim Mynett and his lawyer seemed stunned by Beth Mynett’s sudden speech and immediately asked that she stop.

OMAR REPORTEDLY SHOUTS 'STOP IT!' AS GOP'S MCCARTHY RECOUNTS TLAIB'S PROFANE COMMENT ABOUT TRUMP IMPEACHMENT

“I’m almost finished,” said Beth Mynett, who filed for divorce in August in bombshell court papers alleging her marriage fell apart because Tim Mynett fell in love with Omar while working for her and had carried on an extramarital affair with the freshman Democrat.

The judge broke up the speech and called the attorneys for both Mynetts to the bench and put on sound to drown out their conversations. Then the court hearing abruptly ended without a formal announcement of adjournment.

Both parties left with their lawyers and declined comment. A court clerk came into the hallways afterward with paperwork looking for the Mynetts but was surprised to find them already long gone.

Both Tim Mynett, a political consultant, and Omar have denied any affair.

The divorce case had been rescheduled at least two times prior. The late-morning hearing at the family division of the Superior Court of the District of Columbia was delayed as both Mynetts and their lawyers huddled in a private room to work out the terms of the settlement.

Important to Beth Mynett was that Tim withdraw his counterclaim where he denied the affair with Omar, said he had “been unhappy for the better part" of his relationship with his wife, and accused her of launching a “negative campaign” to ruin his career and damage his relationship with their son and his stepdaughter. While the details of the settlement were not immediately available, courtroom discussion Thursday seemed to indicate the agreement included such a withdrawal.

Lawyers for both sides had also worked out an agreement resolving all the issues of custody, finances and attorney fees. Both Mynetts had signed off on the settlement paperwork and told the court they will abide by the terms.

TRUMP CALLS OUT RASHIDA TLAIB FOR POSTING VIDEO OF HERSELF EXCITEDLY WALKING TO IMPEACHMENT VOTE

But it wasn't over. As Tim Mynett waited inside the courtroom, Beth Mynett sat outside in the hallway and read aloud from her phone -- apparent practice for her courtroom speech.

Around 12:30 p.m., the Mynetts appeared before Soltys for a brief hearing to have the settlement finalized.

Soltys asked both parties a series of questions, including whether Beth Mynett thought there was any hope for reconciliation.

“Absolutely, not,” she said.

Mynett also wanted to have her former name restored.

“I no longer want to have Mr. Mynett’s name attached to me,” Beth explained.

The judge then asked if Tim Mynett disagrees with anything his spouse said: "I do not," he said.

Soltys signed off on all the paperwork.

“So that takes care of everything. The divorce is now final,” Soltys declared roughly 10 minutes into the court hearing.

Soltys then praised the Mynetts for the smooth settlement when too often parents have prolonged court fights. She gave the pair kudos for hashing out the details of their divorce settlement behind the scenes and working to co-parent their child.

“You should be real pleased with yourself,” the judge said.

Then just as the hearing was to wrap up, Beth Mynett spoke up. She wanted to let the court know under threat of “perjury” that it was “appropriate and just” that her ex withdrew his "false" counterclaim against her.

She went on to say she was "devoted" to her marriage and her husband indeed had "happiness" during their 13 years together and seven years of marriage. But her speech was cut short after mentioning Tim Mynett's alleged affair with Omar.

Tim Mynett worked for Omar and his business, E Street Group, got $370,000 of her campaign funds, according to The New York Post, which broke the news of the initial divorce filing.

Conservative watchdogs have filed campaign finance complaints against Omar seeking a probe into whether she used the campaign funds to rendezvous with her alleged lover.

Omar filed for divorce from her husband in October and blamed the media and political foes for killing her marriage.

“Ilhan and Ahmed [Hirsi] have been the object of speculation and innuendo from political opponents and the media,” according to a statement from Omar’s lawyer published by The New York Post.

CLICK HERE TO GET THE FOX NEWS APP

“This has taken a significant toll on Ilhan, Ahmed and their three children. As with all marriages, this is intensely personal and a difficult time for their family,” the statement said.

“Just like any other family navigating this kind of transition, Ilhan wishes to have their privacy respected for themselves and their children and will not be commenting any further," it added.