Washington (CNN) Republican Sen. Tom Cotton was meeting with a foreign leader in his Capitol Hill office Thursday when he received an urgent message to come to the White House.

Playing out amid a high-stakes battle over immigration that's gripped Washington for the past week, the summons was a move to slow down an attempt by Democrats and moderate Republicans to push through a deal, according to a senior Republican with knowledge of the meeting.

Cotton, an immigration hardliner who speaks with the President regularly, quickly hopped into a car. As he rushed across an unseasonably warm Washington, there was little to indicate the meeting he was about to enter would become so heated and ultimately go down as the time the President derided African countries as "shitholes" and asked why more immigrants couldn't come from Norway.

The comment exploded Thursday afternoon, freezing for now negotiations over an immigration deal that would protect some undocumented immigrations from deportation. Democrats are demanding such provisions in exchange for border security funding that could include money for Trump's promised border wall. The rhetoric also underscored, again, that Trump's nativist sentiments are expressed even more bluntly behind closed doors, to the alarm and dismay even of his Republican colleagues.

This account of Trump's latest racially charged controversy is based on interviews Friday with a half-dozen sources in and out of the White House. Sen. Dick Durbin, an Illinois Democrat who was in the meeting, told reporters Friday that Trump's words were "hate filled, vile and racist."

When Cotton arrived at the West Wing reception area Thursday, he found Durbin and Sen. Lindsey Graham, a South Carolina Republican, waiting to brief Trump on their bipartisan immigration negotiations. He also found fellow immigration hardliner GOP Sen. David Perdue of Georgia, who was also called by Trump's aides to brief the President.

Durbin and Graham arrived at the White House believing they would be meeting privately with Trump, a source familiar with the situation said, and were surprised to see the others.

Meeting gets underway

Once the meeting got underway, it was clear Trump wasn't in the mood to entertain the plan being offered by Durbin and Graham, which would have increased border security funding, allowed for a 10- to 12-year path to citizenship for some young undocumented immigrants and provided protections for individuals with Temporary Protected Status from countries such as El Salvador and Haiti.

It was that final provision that prompted Trump's vulgarity. Asking why the US needs more Haitians, he pushed to "take them out" of the deal. And in a separate part of the conversation about the diversity visa lottery, Trump referred to people coming from Africa as coming from "shithole countries."

In the moments after he made the insulting remarks, Trump's advisers and allies looked at one another with concern, according to a White House official. There was little chance the sentiments he expressed, or the foul language he used to express them, would remain private for long.

White House officials expressed distress that Trump's remarks had effectively reversed their attempts to bolster Trump's standing on a week when his mental acuity was being questioned. The news broke minutes after a pre-planned interview published in The Wall Street Journal , which aides had hoped would help affirm Trump's economic message. Instead, his racially charged remarks dominated.

Instead of denying them, the White House came out in defense of Trump's immigration positions. And the President himself -- who had been taping a message marking Martin Luther King Jr. Day when the news broke -- retreated to his private residence, where he began phoning his allies and friends to ask how the comments were playing out in the press.

One White House official referred to the dial-a-friend session as a "victory lap." But the reaction wasn't all positive. At least one friend outside the White House told him he'd made a mistake that would alienate key constituencies he'll need to govern, including business leaders. That type of racially tinged language has to stop, Trump's friend told him.

There was little indication the message got through.

"He loves it," a source familiar with the President's thinking said, describing Trump as relishing the sense he can take matters all the way to the edge without falling off.

Largely unfazed

Photos: Donald Trump's rise President-elect Donald Trump has been in the spotlight for years. From developing real estate and producing and starring in TV shows, he became a celebrity long before winning the White House. Hide Caption 1 of 37 Photos: Donald Trump's rise Trump at age 4. He was born in 1946 to Fred and Mary Trump in New York City. His father was a real estate developer. Hide Caption 2 of 37 Photos: Donald Trump's rise Trump, left, in a family photo. He was the second-youngest of five children. Hide Caption 3 of 37 Photos: Donald Trump's rise Trump, center, stands at attention during his senior year at the New York Military Academy in 1964. Hide Caption 4 of 37 Photos: Donald Trump's rise Trump, center, wears a baseball uniform at the New York Military Academy in 1964. After he graduated from the boarding school, he went to college. He started at Fordham University before transferring and later graduating from the Wharton School, the University of Pennsylvania's business school. Hide Caption 5 of 37 Photos: Donald Trump's rise Trump stands with Alfred Eisenpreis, New York's economic development administrator, in 1976 while they look at a sketch of a new 1,400-room renovation project of the Commodore Hotel. After graduating college in 1968, Trump worked with his father on developments in Queens and Brooklyn before purchasing or building multiple properties in New York and Atlantic City, New Jersey. Those properties included Trump Tower in New York and Trump Plaza and multiple casinos in Atlantic City. Hide Caption 6 of 37 Photos: Donald Trump's rise Trump attends an event to mark the start of construction of the New York Convention Center in 1979. Hide Caption 7 of 37 Photos: Donald Trump's rise Trump wears a hard hat at the Trump Tower construction site in New York in 1980. Hide Caption 8 of 37 Photos: Donald Trump's rise Trump was married to Ivana Zelnicek Trump from 1977 to 1990, when they divorced. They had three children together: Donald Jr., Ivanka and Eric. Hide Caption 9 of 37 Photos: Donald Trump's rise The Trump family, circa 1986. Hide Caption 10 of 37 Photos: Donald Trump's rise Trump uses his personal helicopter to get around New York in 1987. Hide Caption 11 of 37 Photos: Donald Trump's rise Trump stands in the atrium of the Trump Tower. Hide Caption 12 of 37 Photos: Donald Trump's rise Trump attends the opening of his new Atlantic City casino, the Taj Mahal, in 1989. Hide Caption 13 of 37 Photos: Donald Trump's rise Trump signs his second book, "Trump: Surviving at the Top," in 1990. Trump has published at least 16 other books, including "The Art of the Deal" and "The America We Deserve." Hide Caption 14 of 37 Photos: Donald Trump's rise Trump and singer Michael Jackson pose for a photo before traveling to visit Ryan White, a young child with AIDS, in 1990. Hide Caption 15 of 37 Photos: Donald Trump's rise Trump dips his second wife, Marla Maples, after the couple married in a private ceremony in New York in December 1993. The couple divorced in 1999 and had one daughter together, Tiffany. Hide Caption 16 of 37 Photos: Donald Trump's rise Trump putts a golf ball in his New York office in 1998. Hide Caption 17 of 37 Photos: Donald Trump's rise An advertisement for the television show "The Apprentice" hangs at Trump Tower in 2004. The show launched in January of that year. In January 2008, the show returned as "Celebrity Apprentice." Hide Caption 18 of 37 Photos: Donald Trump's rise A 12-inch talking Trump doll is on display at a toy store in New York in September 2004. Hide Caption 19 of 37 Photos: Donald Trump's rise Trump attends a news conference in 2005 that announced the establishment of Trump University. From 2005 until it closed in 2010, Trump University had about 10,000 people sign up for a program that promised success in real estate. Three separate lawsuits -- two class-action suits filed in California and one filed by New York's attorney general -- argued that the program was mired in fraud and deception. Trump's camp rejected the suits' claims as "baseless." And Trump has charged that the New York case against him is politically motivated. Hide Caption 20 of 37 Photos: Donald Trump's rise Trump attends the U.S. Open tennis tournament with his third wife, Melania Knauss-Trump, and their son, Barron, in 2006. Trump and Knauss married in 2005. Hide Caption 21 of 37 Photos: Donald Trump's rise Trump wrestles with "Stone Cold" Steve Austin at WrestleMania in 2007. Trump has close ties with the WWE and its CEO, Vince McMahon. Hide Caption 22 of 37 Photos: Donald Trump's rise For "The Apprentice," Trump was honored with a star on the Hollywood Walk of Fame in January 2007. Hide Caption 23 of 37 Photos: Donald Trump's rise Trump appears on the set of "The Celebrity Apprentice" with two of his children -- Donald Jr. and Ivanka -- in 2009. Hide Caption 24 of 37 Photos: Donald Trump's rise Trump poses with Miss Universe contestants in 2011. Trump had been executive producer of the Miss Universe, Miss USA and Miss Teen USA pageants since 1996. Hide Caption 25 of 37 Photos: Donald Trump's rise In 2012, Trump announces his endorsement of Republican presidential candidate Mitt Romney. Hide Caption 26 of 37 Photos: Donald Trump's rise Trump speaks in Sarasota, Florida, after accepting the Statesman of the Year Award at the Sarasota GOP dinner in August 2012. It was shortly before the Republican National Convention in nearby Tampa. Hide Caption 27 of 37 Photos: Donald Trump's rise Trump appears on stage with singer Nick Jonas and television personality Giuliana Rancic during the 2013 Miss USA pageant. Hide Caption 28 of 37 Photos: Donald Trump's rise In June 2015, during a speech from Trump Tower, Trump announced that he was running for President. He said he would give up "The Apprentice" to run. Hide Caption 29 of 37 Photos: Donald Trump's rise Trump -- flanked by U.S. Sens. Marco Rubio, left, and Ted Cruz -- speaks during a CNN debate in Miami on March 10. Trump dominated the GOP primaries and emerged as the presumptive nominee in May. Hide Caption 30 of 37 Photos: Donald Trump's rise The Trump family poses for a photo in New York in April. Hide Caption 31 of 37 Photos: Donald Trump's rise Trump speaks during a campaign event in Evansville, Indiana, on April 28. After Trump won the Indiana primary, his last two competitors dropped out of the GOP race. Hide Caption 32 of 37 Photos: Donald Trump's rise Trump delivers a speech at the Republican National Convention in July, accepting the party's nomination for President. "I have had a truly great life in business," he said. "But now, my sole and exclusive mission is to go to work for our country -- to go to work for you. It's time to deliver a victory for the American people." Hide Caption 33 of 37 Photos: Donald Trump's rise Trump faces Democratic nominee Hillary Clinton in the first presidential debate, which took place in Hempstead, New York, in September. Hide Caption 34 of 37 Photos: Donald Trump's rise Trump apologizes in a video, posted to his Twitter account in October, for vulgar and sexually aggressive remarks he made a decade ago regarding women. "I said it, I was wrong and I apologize," Trump said, referring to lewd comments he made during a previously unaired taping of "Access Hollywood." Multiple Republican leaders rescinded their endorsements of Trump after the footage was released. Hide Caption 35 of 37 Photos: Donald Trump's rise Trump walks on stage with his family after he was declared the election winner on November 9. "Ours was not a campaign, but rather, an incredible and great movement," he told his supporters in New York. Hide Caption 36 of 37 Photos: Donald Trump's rise Trump is joined by his family as he is sworn in as President on January 20. Hide Caption 37 of 37

Inside the White House, staffers were largely unfazed, even at the political and diplomatic fallout mounted. At least two American envoys overseas -- in Haiti and Botswana -- were summoned to explain the President's remarks. And some of Trump's closest allies, including House Speaker Paul Ryan, expressed dismay.

"I read those comments later last night, the first thing that came to my mind was very unfortunate, unhelpful," the Wisconsin Republican said at WisPolitics Luncheon in Milwaukee.

Trump's staffers largely shrugged. Though the President's crude comments might enrage Washington and much of the international community, his aides predicted the remarks would resonate with the President's base, much like his attacks on NFL players who kneel during the national anthem.

And some of Trump's allies insisted the remarks simply reflected his frustration at an immigration deal that fell short of his expectations.

"He was supposed to have a meeting where these lawmakers were going to come in and talk about merit-based immigration reform, and they came to him with something that had a whole bunch of carveouts," said Jason Miller, Trump's former campaign spokesman and a CNN contributor. "The fact that these folks came to him with a plan that wasn't acceptable, in his mind, obviously, he was fired up. So there was salty language back and forth on either side."

Denials

By Friday morning, Trump took to Twitter to make an attempt at denying the most vulgar of his remarks -- more than 12 hours after they were originally reported.

"The language used by me at the DACA meeting was tough, but this was not the language used," he said in one tweet.

The language used by me at the DACA meeting was tough, but this was not the language used. What was really tough was the outlandish proposal made - a big setback for DACA! — Donald J. Trump (@realDonaldTrump) January 12, 2018

"Never said anything derogatory about Haitians other than Haiti is, obviously, a very poor and troubled country," he wrote in another, musing that he should record his future meetings to avoid discrepancies.

Then it was on to the Roosevelt Room, where he was due to sign a proclamation marking the upcoming Martin Luther King Jr. Day holiday.

"Today we celebrate Dr. King for standing up for the self-evident truth Americans hold so dear, that no matter what the color of our skin, or the place of our birth, we are all created equal by God," he said, flanked by a group of African-American supporters.

After signing the document, reporters called out repeatedly to ask whether he was a racist.

Trump left without answering.