Sen. Lindsey Graham saw a distinct change in President Donald Trump's views on immigration legislation last week — and he pinned it on one White House aide in particular on Friday.

On Jan. 9, Trump told lawmakers to seek a bipartisan solution on immigration and signaled that he would sign whatever they put in front of him. Two days later, he flatly rejected a plan brought to him by Graham, Sen. Dick Durbin, D-Ill., and others, helping to set back talks on avoiding a government shutdown that will happen at midnight if Congress cannot reach a deal.

Graham, who said he will not support a temporary funding bill passed by the House when the Senate takes it up Friday, sees Trump policy advisor Stephen Miller as part of the problem.

"The Stephen Miller approach to immigration has no viability. Tuesday, the president was in a good place. He was the president of all of us," Graham told MSNBC on Friday. "He spoke compassionately about immigration, tough on security, wanted bipartisanship. Two days later, there was a major change."

"I think the change comes about from people like Mr. Miller. Mr. Miller is well known in the Senate for having views that are outside the mainstream," he added.

Some senators thought the bipartisan proposal presented to Trump met the president's immigration demands. It would have protected hundreds of thousands of young undocumented immigrants while boosting border security measures and reforming extended family migration and the visa "lottery" system.

It also would have given the immigrants shielded by the Deferred Action for Childhood Arrivals program, which Trump ended, an eventual pathway to citizenship.

Graham suggested that Miller, an immigration hardliner, rejected the outlines of the bipartisan deal. He also said that the approach of his colleague Sen. Tom Cotton, R-Ark., "has no viability" in bipartisan talks.

Graham told MSNBC that voting for the House bill, which would keep the government funded through Feb. 16, would extend "chaos."

The senator's negotiations with his colleagues appeared to be ongoing. As Graham spoke to MSNBC, he got a cell phone call from Durbin.

"This is Durbin," Graham said, momentarily stepping away from the camera. "Dick, can I call you right back?"