NEW YORK - Immigrants who were brought to the U.S. illegally as children, but were protected from deportation by President Barack Obama, are being warned by some advocates to make sure they are not traveling abroad when Donald Trump is sworn in as president on Jan. 20.

Some advocates, lawyers and universities are concerned that Trump might immediately rescind the Development, Relief, and Education for Alien Minors (DREAM) Act, an Obama program that had allowed these young immigrants to work and travel for humanitarian, educational or employment purposes.

That could lead, they fear, to some people traveling abroad being barred from re-entering the U.S.

Get Breaking News Delivered to Your Inbox

“We are recommending all travel be completed by or before Jan. 20 in the event laws or procedures experience a drastic change,” said Angelica Salas, executive director of the Coalition for Humane Immigrant Rights of Los Angeles. “We wouldn’t want to expose them to an uncertain situation should they not be allowed back to the U.S.”

Mr. Trump made illegal immigration the cornerstone of his campaign, promising to build a wall along the Mexican border and deport millions of people living in the country illegally.

His actual plans, though, have yet to be revealed. Recently, Mr. Trump has said he wants to focus on people who have committed crimes.

During a recent Time magazine interview, Trump expressed sympathy for the 741,000 people in Obama’s Deferred Action for Childhood Arrivals (DACA) program, which started in 2012.

“We’re going to work something out that’s going to make people happy and proud,” President-elect Trump said. “They got brought here at a very young age, they’ve worked here, they’ve gone to school here. Some were good students. Some have wonderful jobs. And they’re in never-never land because they don’t know what’s going to happen.”

Complicating matters, the president-elect’s advisers worked to walk back his comments almost as soon as they were published, with one transition aide demanding anonymity to deny that Trump intended to set any new policy.

Advocates are still being cautious.

Nancy Lopez-Ramirez, a 20-year-old student born in Mexico who is planning a trip there as part of a City College of New York class, said she is glad the group is returning by Jan. 15.

“My mom is like ‘I am concerned with you not coming back, I want you to be able to come back,’” she said.

“It is nerve-wracking but I think that at the end it is going to be worth it,” said the political-science student, who was brought to the U.S. when she was 4.

City College, part of the City University of New York, is one of the institutions advising students in the DACA program to return before Inauguration Day. So is California State University, which told administrators to tell participants in the program “that if they are outside of the United States as of January 20, 2017, there is no assurance they will be allowed to return to the U.S.”

Mr. Trump can rescind the promised protection right away through an “operational memo” because Obama implemented it through one, said William Stock, president of the American Immigration Lawyers Association.

He said the program’s participants should not consider traveling overseas unless they absolutely need to.

U.S. Customs and Border Protection spokesman Anthony Bucci said his agency “cannot speculate” when he was asked how long would it take for CBP officers to deny entry to the U.S. to program participants if Trump eliminated the protection.

U.S. Citizenship and Immigration Services records said that as of Dec. 31, 2015, about 22,340 people in the DACA program were approved for the “parole” that allows them to travel outside the U.S.

Trump called the program an “illegal amnesty” during his campaign.

Tatyana Kleyn, an associate professor at City College who organized the upcoming Mexico trip, said interest in it actually surged among students after the presidential election.

“So right now our bus fits 18 and we are bringing 20,” she said. “It feels like a last chance.”