Outside the Oval Office, Bolton and Kelly clashed, with the chief of staff defending Nielsen.
The three people said Kelly and Bolton were sparring over an issue that has frequently angered the president and has often prompted him to lash out at Kirstjen Nielsen, who succeeded Kelly as the secretary of homeland security after serving as his deputy chief of staff in the White House.
"I must, in the strongest of terms, ask Mexico to stop this onslaught", he said, threatening to close the border using the United States military if that doesn't happen. Two people described the exchange as less a shouting match than an intense argument.
Trump on Thursday tweeted that he was prepared to call out the military and even close the border if the "onslaught" is not stopped.
Trump threatens to send military against immigrant ‘onslaught’
Mexican Federal Police released a video of officers arriving in the border state of Chiapas, some toting riot gear. The group of Salvadoreans, Hondurans and Guatemalans say they are fleeing violence and poverty.
The White House was debating immigration and whether Republicans should use it as a campaign message for November's midterm elections when the discussion erupted into a heated debate.
The back and fourth reportedly led those nearby to think one of the two men may quit immediately. Trump, who was incensed about the rising levels of migrants and threatened to shut down the southern border on Twitter earlier that morning, took Bolton's side during the argument.
It's not clear if Trump heard the argument.
After the confrontation was reported, White House Press Secretary Sarah Huckabee Sanders issued a statement indicating that there are no hard feelings among the president's senior advisers. "Despite us having the worst laws in the world and no help from Democrats, our administration is doing a great job on the border", she said.