WASHINGTON — President Trump on Friday said he would announce a decision by Tuesday on whether he will end the Obama-era program that shields young undocumented immigrants from deportation, declaring, “We love the Dreamers” even as his White House grappled with how to wind down their legal status.

Mr. Trump has agonized publicly over the fate of immigrants who were brought to the United States without authorization as children, and who are now protected from deportation and allowed to work under the five-year-old program created by his predecessor.

In recent days, White House officials have recommended that the president end the Deferred Action for Childhood Arrivals program, known as DACA, which currently shields about 800,000 undocumented immigrants who would be subject to potential deportation to countries that many of them have not seen since birth.

Several administration officials said that Mr. Trump is likely to phase out the program, but his advisers have engaged in a vigorous behind-the-scenes debate over precisely how to do so. The officials, who spoke on condition of anonymity because no decision was final, also cautioned that the president was conflicted about the issue and could suddenly change his mind.