Democratic Sen. Chris Murphy, a strong proponent of gun control legislation, said President Trump is “trying to have it both ways” as his administration waffles on measures to curb gun violence.

“I think he knows that the mood of the country has shifted such that he and his party are going to pay a huge price at the polls in 2018 and 2020 if they don’t start supporting things like universal background checks,” Murphy, of Connecticut, said Sunday on ABC’s “This Week.”

Murphy also suggested that while efforts for sensible gun control have re-emerged after 17 people were killed at a Florida high school on Feb. 14, Trump still has loyalties to the National Rifle Association, which endorsed him and spent $30 million to back him during the 2016 campaign.

“At the same time, the NRA was one of his earliest supporters once he was moving toward the nomination as he was trying to consolidate the Republican establishment in 2016,” Murphy said.

“And so he’s trying to keep them happy as well.”

The president hosted a White House meeting last week with a group of bipartisan lawmakers where he said he would like to see the Republican and Democratic lawmakers come up with a “comprehensive” group of proposals.

At the meeting, he backed universal background checks for gun purchases, having armed security at schools and keeping guns out of the hands of the mentally ill.

By the end of the week, after Trump met with top officials of the NRA, White House press secretary Sarah Huckabee Sanders walked back some of his positions, including universal background checks.

“He wants to see what that legislation, the final piece of it looks like,” she said.

“Universal means something different to a lot of people. He certainly wants to focus and improve on the background check system.”