When President Trump suggested he was open to finding a compromise on immigration after last week’s midterms, Democratic lawmakers and conservative allies rushed to assess whether the president was truly pulling a U-turn on a policy central to his political identity.

Senator Richard J. Durbin, Democrat of Illinois, called for Mr. Trump to “keep your word” and work with lawmakers to pass legislation that would provide legal status to certain undocumented immigrants brought into the country as children. Mr. Trump’s homeland security secretary acknowledged he was fielding calls from Democratic lawmakers interested in a deal on immigration policy. Mr. Trump’s conservative allies accused him of pursuing “amnesty” for immigrants.

President Trump said he had not told Stephen Miller, his new chief of staff, to make any changes to the administration’s efforts to deport millions.Credit...Haiyun Jiang/The New York Times

Then, just as quickly, the president flipped again, shutting down the idea that he was softening his position.

“We have a very strong deportation policy; there’s no amnesty, no, no anything. We keep that,” Mr. Trump told reporters at the White House on Monday, adding that he had not told Stephen Miller, the architect of his immigration agenda and his new chief of staff, to make any changes to the administration’s efforts to deport millions. “My policy hasn’t changed.”

The president’s conflicting signals were the latest case in which he has indicated he is open to scaling back his hard-line policy when faced with pressure from voters or business leaders, only to revert to aggressive deportation and border policies.