President Trump lashed out Thursday at a Democratic senator who publicly shared that Supreme Court nominee Neil Gorsuch had told him he found Trump’s attacks on the federal judiciary “disheartening” and “demoralizing.”

Taking to Twitter in the morning, Trump tried to question the credibility of Sen. Richard Blumenthal (D-Conn.) by referring to a 2010 acknowledgment by the then-Connecticut attorney general that he had misspoken about having served in Vietnam, when in fact he had never gone to war.

“Sen. Richard Blumenthal, who never fought in Vietnam when he said for years he had (major lie), now misrepresents what Judge Gorsuch told him?” Trump said in his tweet.

Trump repeated his line of attack during a Thursday lunch meeting with senators to discuss his nominee.

"[Gorsuch's] comments were misrepresented and what you should do is ask Senator Blumenthal about his Vietnam record, which didn't exist after years of saying it did,” Trump said in response to a reporter's question. “He misrepresented that just like he misrepresented Judge Gorsuch.”

Trump's attacks were in response to Blumenthal's relaying of comments to reporters on Wednesday that the senator said Gorsuch made during a private meeting. The account was confirmed by Ron Bonjean, a member of the group guiding the judge through his confirmation process on behalf of the Trump administration.

During a news briefing Thursday afternoon, White House press secretary Sean Spicer said his understanding was that Gorsuch was not commenting on Trump's remarks in particular but saying he disapproves of attacks on the judiciary more broadly. Spicer said those are “very different” propositions.

“The judge was very clear that he was not commenting on any specific matter,” Spicer said.

Spicer also said Trump has “no regrets” about his derogatory comments about the judiciary, which have included speaking dismissively about a “so-called judge.”

“He is free is to speak his mind,” Spicer said. “Part of the reason the president got elected is because he speaks his mind.”

Blumenthal stood by his account in an interview with The Post on Thursday morning.

If the president has any doubts about Gorsuch's comments, “his own White House staff was in the room, so I think he just needs to talk to them,” he said.

As for Trump's attack on Blumenthal's fabricated history of military service in Vietnam, the senator said: “The issue is really not about me. It's about the independence of the American judiciary. There is a fundamental core democratic principle at stake.”

“Judge Gorsuch needs to stand up to this bullying, and I believe he has to publicly condemn it,” the senator added.

Watch Neil Gorsuch's full speech after President Trump picked the appeals judge to fill the late Justice Antonin Scalia's Supreme Court seat. (Victoria Walker/The Washington Post)

Blumenthal told reporters Wednesday that Gorsuch gave him permission to make his comments public. But the senator also said he had urged Gorsuch to speak out directly.

Sen. Ben Sasse (R-Neb.) also spoke out Thursday about a conversation he said he had with Gorsuch about Trump's remarks on the federal judiciary.

“He got pretty passionate about it,” Sasse said on MSNBC's “Morning Joe” program.

Sasse said that Gorsuch told him “any attack on … brothers or sisters of the robe is an attack on all judges.”

During the White House briefing, Spicer cut off reporters trying to ask about the comments of Sasse, who indicated that he had asked specifically about Trump's remarks.

In a statement Thursday, former senator Kelly Ayotte (R-N.H.), who heads the team shepherding Gorsuch through the confirmation process, said that in his discussions with senators, the judge has “emphasized the importance of an independent judiciary.”

“While he made clear that he was not referring to any specific case, he said that he finds any criticism of a judge's integrity and independence disheartening and demoralizing,” Ayotte said.

Trump has made several disparaging comments about the federal judiciary in the wake of an order halting his directive temporarily barring refugees as well as citizens of seven Muslim-majority countries from entering the United States.

Video: Trump reads immigration law and defends his order (The Washington Post)

Trump said Wednesday that an appeals court’s hearing Tuesday night regarding his controversial immigration executive order was “disgraceful” and that judges were more concerned about politics than following the law.

The remarks followed earlier tweets from Trump disparaging “the so-called judge” who issued a nationwide stop to his plan and saying the ruling “put our country in such peril. If something happens blame him and court system.”

Blumenthal came under sharp criticism during his 2010 Senate campaign for repeated remarks over the years that he had “served” in Vietnam, even though he did his full Marine service in the United States. Blumenthal obtained several deferments between 1965 and 1970 and then joined the Marine Corps Reserve, but did not serve in Vietnam. He later said he misspoke and intended to say that he was in the Marine Reserve during the Vietnam conflict.

Later Thursday morning, Trump also heavily criticized CNN's Chris Cuomo for how he handled an interview with Blumenthal regarding his meeting with Gorsuch.

“Chris Cuomo, in his interview with Sen. Blumenthal, never asked him about his long-term lie about his brave 'service' in Vietnam,” Trump said on Twitter.

“FAKE NEWS!” the president added, using a term he has frequently employed to describe CNN and other media in recent weeks.

In fact, Cuomo did ask Blumenthal about his military service during the interview.

“The president, with all due respect, is once again off on the facts,” Cuomo later said on the air after reading Trump’s tweet and replaying part of the interview.

During the lunch with senators Thursday, Trump touted Gorsuch's credentials.

“He will apply the law as written,” Trump said. “He's a mainstream judge, very much mainstream, and I urge you all to confirm him.”

Trump said that he feared some Democrats would vote against Gorsuch purely because of politics.

The scene as President Trump announced his Supreme Court nominee

U.S. Vice President Mike Pence talks with Maureen Scalia, widow of the the late U.S. Supreme Court Associate Justice Antonin Scalia, as they attend the announcement by U.S. President Donald Trump of his nomination for the empty associate justice seat at the U.S. Supreme Court, at the White House in Washington, D.C., U.S. January 31, 2017. REUTERS/Kevin Lamarque (Kevin Lamarque/Reuters)

Ed O'Keefe contributed to this report.