Congressional leaders — including Democrats — broadly praised President Donald Trump for walking away from his second summit with North Korean dictator Kim Jong Un on Thursday.

Talks in Vietnam between Trump and Kim abruptly ended Thursday before a planned lunch and signing ceremony for some kind of agreement. Trump said he cut the summit short because the sides could not come to terms on whether to remove sanctions on North Korea as they seek a path to Pyongyang's denuclearization.

"Sometimes you have to walk, and this was just one of those times," the U.S. president said during a news conference following the summit.

Congressional leaders largely cheered Trump for backing out of talks instead of agreeing to unfavorable terms. Democrats in particular said they had worried about the president striking an inadequate deal — in part to alleviate pressure created by his former lawyer Michael Cohen's explosive Capitol Hill testimony on Wednesday.

"I was pleased to see the president recognize North Korea's unwillingness to strike a comprehensive deal," Senate Minority Leader Chuck Schumer said on the Senate floor Thursday. "President Trump did the right thing by walking away and not cutting a poor deal for the sake of a photo op. ... I've always been concerned about the possibility of a bad deal, especially with the other pressures currently on the president."

While House Speaker Nancy Pelosi declared Kim "the big winner" for getting two face-to-face meetings with the U.S. president, she praised Trump for walking away on Thursday. The California Democrat told reporters "it's good that the president did not give him anything for the little that he was proposing."

Trump has pushed North Korea to give up its nuclear weapons, touting the economic benefits the repressive country could see if the U.S. and international community ease sanctions. Kim is reluctant to give up nuclear weapons and the leverage they give him.

Trump hopes to notch a signature foreign policy achievement by pushing North Korea to denuclearize. He also wants to show he could accomplish what his predecessor President Barack Obama could not. Trump has repeatedly claimed the U.S. was on the brink of war with Pyongyang before he took office, although Obama administration veterans dispute this characterization.

But Trump's clamoring for a deal did not drive him to accept one Thursday. The president said he "would not have been happy about" any agreement that would have come out of the leaders' second summit.

"Basically, they wanted the sanctions lifted in their entirety and we couldn't do that," Trump said. "They were willing to denuke a large portion of the areas that we wanted, but we couldn't give up all of the sanctions for that. So we continue to work and we'll see, but we had to walk away from that particular suggestion. We had to walk away from that."

Senate Majority Leader Mitch McConnell called it "smart" to meet Kim in Singapore and in Vietnam to show him the "economic prosperity" possible if North Korea abandons its nuclear and missile programs. He added that the "president should be commended for walking away when it became clear insufficient progress has been made on denuclearization."

In a tweeted statement, Trump confidant Sen. Lindsey Graham said "it's better to walk away than sign a bad deal."

Lindsey Graham tweet