President Trump said Wednesday that Attorney General William Barr did a “fantastic” job testifying in front of the Senate Judiciary Committee — and accused the three 2020 Democratic hopefuls who questioned him of acting like “lunatics” during the hearing.

The president’s comments came just hours after Barr was grilled by the panel for the first time since the release of special counsel Robert Mueller’s Russia report.

“He did a fantastic job today I am told,” Trump said via phone on Fox Business’ “Trish Regan Primetime.” “I got to see some of it. He did a fantastic job.”

Trump also pushed back against calls from Democratic lawmakers for Barr to resign.

“I haven’t even heard that,” Trump said. “It is so ridiculous, he is an outstanding man . . . I heard he really performed incredibly well today.”

One of the lawmakers calling for Barr to step down is Sen. Kamala Harris (D-CA), who questioned the AG during the hearing.

“She was probably very nasty,” Trump said about the 2020 contender.

Trump accused Harris and other presidential challengers, Sen. Cory Booker (D-NJ) and Sen. Amy Klobuchar (D-MN), who also questioned Barr, of “trying to score political points.”

“How about these three people?…You have three of them running against me and they are up there ranting and raving. Like lunatics, frankly. How is that fair?” Trump said.

“So you have Bill Barr, highly respected, great attorney general and he has to take the abuse from people that are running for office. They don’t care about this, they’re just looking for political points. And I really think the American people see through it so easily.”

He said that a possible 2020 run against former Vice President Joe Biden “would make four years ago look like baby stuff.”