WASHINGTON — As they departed the now famous Oval Office meeting where President Trump used vulgar language to disparage the national origin of some potential immigrants, Senators Lindsey Graham and Richard J. Durbin found themselves in a condition unfamiliar to such veteran politicians: speechless.

“After Lindsey and I left the room and got in the car together to come back to Capitol Hill, it was silence in the car,” Mr. Durbin, of Illinois, recalled in an interview on Thursday, describing their mutual distress at the ominous turn the negotiations had taken as well as the president’s conduct. “We had just witnessed something that neither one of us ever expected.”

That sudden breakdown in talks toward a bipartisan immigration solution has had significant repercussions. In the absence of a deal to permanently protect young immigrants in what is known as the Deferred Action for Childhood Arrivals program, or DACA, the Republican-controlled House and Senate are now struggling to keep the government open past Friday.

And the uproar surrounding the disclosure of Mr. Trump’s language has added a huge complication, stirring outrage among Democrats and their allies and sowing confusion among Republicans about the president’s true aims. Most Democrats are refusing to help pass any temporary spending plan without the immigration legislation and Republicans are having a difficult time rounding up votes on their own.

In recounting events, Mr. Durbin, the No. 2 Senate Democrat, who has been pushing to protect young immigrants for nearly two decades, noted that he had a promising telephone call with Mr. Trump hours before last week’s meeting. Then he was invited to join Mr. Graham, Republican of South Carolina and a longtime advocate of an immigration law overhaul, at the White House for what they believed was a session to complete a bipartisan agreement to protect the young immigrants known as Dreamers in exchange for new border security and other immigration law changes.

Instead, they ran into a buzz saw of angry and coarse opposition from the president, reinforced by the surprise presence of hard-line opponents of immigration overhaul from the House and Senate.

“The deck was stacked against us as the president walked in the room,” said Mr. Durbin, who said Mr. Graham, seated next to the president, began laying out the specifics of the pending agreement only to have the meeting quickly deteriorate.

“He barely had a sentence or two out of his mouth, then the president started commenting. ‘Who is affected by that? What is this going to do?’” said Mr. Durbin, the sole Democrat of a dozen people present. “It was a very tough conversation starting immediately.”

“The language that was used, the attitude of the president, the expressions he made when it came to immigration just stunned me,” Mr. Durbin said.

Mr. Durbin, who has been in Congress for more than three decades and is no stranger to political back rooms, said the meeting was not the usual case of salty language shared among politicians gathered behind closed doors.

“It was beyond, and the intensity of the president’s feeling, and what he said there, as well as many other epithets during the course of it, I was surprised and shocked in a way,” he said, noting that upon his return to the Capitol, some colleagues commented on his demeanor.

“They said, ‘You look shaken,’ and I said I was,” he said. “After you have been in politics as long I have, it takes something to shake you up.”

Mr. Durbin said he did not personally leak details of the conversation and also directed his staff not to discuss it. But he did share his version of events with four other senators as they plotted how to proceed. Word of what happened during the meeting — and one word in particular — quickly circulated and was first reported by The Washington Post within hours.

Mr. Durbin then began discussing the meeting in public the next morning while in Chicago after the White House did not deny reports of what transpired. The president and others attending the meeting only later challenged exactly what expletives were used in describing countries that Mr. Trump wanted to prevent from sending migrants to the United States.

Though the disclosure has roiled the negotiations, Mr. Durbin said it has also provided better context of the president’s immigration stance.

Image

Listen to ‘The Daily’: On the Verge of a Shutdown

Senator Richard Durbin of Illinois discusses how President Trump’s racially charged comments led to a showdown over keeping the government open.

“Now that the American people have a clearer understanding of the president’s motivation on immigration, it makes it easier to confront some of the things he’s suggesting,” Mr. Durbin said.

He noted that the president previously said his focus was on border security, preventing terrorists from entering the country and protecting jobs for American workers. The new comments, Mr. Durbin suggested, show that racial origin might be a consideration, as well. He said he warned Mr. Trump that singling out Haitians for exclusion was “an obvious racial decision.”

“This may not be about security or American jobs at all,” Mr. Durbin said. “It may be about something else.”

Mr. Durbin stopped short, though, of branding Mr. Trump a racist.

“That’s a tough thing to say,” he said. “But I will tell you this: Some of the comments he made were clearly racial during the course of that meeting in the White House. They were hate-filled and vile.”

The meeting caused a rare situation where members of the Senate are publicly questioning each other’s veracity. Senators Tom Cotton of Arkansas and David Perdue of Georgia, both Republicans, were in the meeting and have disputed Mr. Durbin’s account, saying the word “shithole” in reference to some countries was not used.

“How could you sit in the Oval Office of the White House and hear the president of the United States use this word and not remember it,” Mr. Durbin asked. “I will just have to tell you they are wrong and they know they are wrong.”

Mr. Durbin said that a decision by some Republicans to break with the president’s position — along with mounting frustration over a series of short-term spending bills — has contributed to growing support for the bipartisan immigration agreement. He remains optimistic that a deal is in reach.

But Mr. Durbin also was hopeful last week before the president, in a burst of profanity, unraveled an agreement and Congress must now negotiate the aftermath.

A version of this article appears in print on , on Page A16 of the New York edition with the headline: Comments in Meeting Shed Light on Trump’s Motivations, Durbin Says. Order Reprints | Today’s Paper | Subscribe