WASHINGTON — A witness in Wednesday's impeachment hearing who found herself facing criticism directly from First Lady Melania Trump when she referenced Trump's youngest son Barron during her testimony about constitutional law, has now apologized

Stanford Law School Professor Pamela Karlan was asked what comparisons could be made today between "kings, that the framers were afraid of" and the president's conduct.

Prof. Karlan replied by saying, "so, kings could do no wrong because the king's word was law, and contrary to what President Trump has said, article two does not give him the power to do anything he wants, and I'll just give you one example that shows you the difference between him and a king, which is the constitution says there can be no titles of nobility." 

Karlan added, "so, while the president can name his son Barron, he can't make him a Barron." Her remark initially garnered some laughs in the hearing room, but Republicans later reprimanded the witness and it led to a heated exchange between her and Rep. Matt Gaetz. 

Gaetz accused the professor of not being grounded in understanding modern politics from the "ivory towers" of her law school.

"When you invoke the president's son's name here," Rep. Gaetz said, "when you try to make a little joke out of referencing Barron Trump, that does not lend credibility to your argument. It makes you look mean. It makes you look like you're attacking someone's family. The minor child of the president of the United States," Gaetz declared. 

RELATED: Law professors' testimony continues partisan divide on Trump impeachment

RELATED: Impeachment hearings during the holidays: non-profit helps bridge the political divide

The first lady tweeted that Karlan "should be ashamed" of her "very angry and obviously biased public pandering, and using a child to do it." 

President Trump's re-election campaign also issued a statement that claimed "Hunter Biden is supposedly off-limits" but "a 13-year-old boy is fair game." 

Hours later and into Thursday morning, the hashtag #FakeOutrage began trending on Twitter. People called out the First Lady, claiming she was being hypocritical. They noted she did not speak up when President Trump apparently mocked 16-year-old climate activist Greta Thunberg in September. Critics also noted the policy that led to the separation of children from their parents at the southern border. And some mentioned the aftermath of the massacre at an El Paso, Texas, Walmart in which the Trumps smiled and posed for a photo with a baby who had just lost both his parents in the tragedy.

TEGNA's Travis Pittman contributed to this report.