WASHINGTON — President Trump’s sympathetic remarks about the young undocumented immigrants known as Dreamers — “these incredible kids,” he has called them — were a surprising turn for a man who had vowed during the campaign to “immediately terminate” their protections from deportation.

But they are unlikely to be the last word. Mr. Trump has not ruled out ending the Obama-era program that shields the young immigrants, who have taken little comfort in his comments. And the president is already coming under intense pressure from the immigration hard-liners in his Republican base to keep his promise.

The problem that Mr. Trump faces as he worries aloud about how to handle the young immigrants, who were brought illegally to this country as small children, encapsulates the beating heart of the difficult choices confronting him. In theory, it is a question of laws and numbers, but in practice it is an emotional and often gut-wrenching matter of human lives affected and families at risk.

It also captures the rifts within the White House, where Stephen K. Bannon, the president’s chief strategist, and Stephen Miller, his policy director, are driving a get-tough immigration policy while Reince Priebus, his chief of staff, has counseled a gentler approach.