President Obama said Friday his administration would stop deporting some illegal immigrants who were brought to the country as children and have gone on to be productive and otherwise law-abiding residents, forcing the emotional immigration policy debate into the forefront of the presidential campaign.

Obama described his decision as the “right thing to do for the American people,” but many Democrats and immigration advocates also saw it as the right strategic move to boost his reelection chances.

The policy puts political pressure on Obama’s Republican challenger, Mitt Romney, by highlighting past GOP opposition to legislation designed to help young immigrants and by forcing Romney to confront his party’s sharp divisions over the issue.

But the shift also carried some danger for the president, who risks alienating centrist swing voters who tend to be more conservative on immigration issues and could see the move as politically opportunistic.

Several conservative Republican lawmakers quickly denounced Obama’s move as “backdoor amnesty.”

One Republican, Rep. Steve King of Iowa, said he planned to sue to block the president’s policy.

The announcement followed a years-long dispute between the president and immigration advocates, who had warned in a series of private encounters that he would lose credibility with Hispanic voters if he did not use his power to help a group of young people that had become the most visible and sympathetic target of his administration’s aggressive deportation policies.

The president had long insisted that he lacked the legal authority to halt the removals, calling instead for passage of the Dream Act, the stymied legislation intended to put many illegal immigrant students and veterans on a path to citizenship.

But the White House began to feel more pressure from advocates this spring when a prominent Hispanic Republican, Sen. Marco Rubio of Florida, began working with activists on a scaled-back version of the bill.

On Friday, Obama seemed to find a middle ground, granting a two-year reprieve from deportation for certain eligible immigrants but not granting them legal status.

“These are young people who study in our schools, they play in our neighborhoods, they’re friends with our kids, they pledge allegiance to our flag,” Obama said during an afternoon Rose Garden appearance. “They are Americans in their heart, in their minds, in every single way but one: on paper.”

Romney has opposed the Dream Act in the past and staked out other hard-line positions on immigration. He has come under fire from some party leaders who say he is turning off Hispanic voters.

Polls show Obama holds a wide lead among Hispanics, but Republican strategists think Romney can win the election even if he peels only a fraction of Hispanic voters away from the president.

Romney issued a careful statement, telling reporters during a campaign bus tour in New Hampshire that he favored a more permanent legislative fix.

“I think the action that the president took today makes it more difficult to reach that long-term solution because an executive order is, of course, just a short-term matter," Romney said.

Romney’s tightrope walk was further evident when he said that he agreed with a statement issued Friday by Rubio gently criticizing the Obama policy, only to be followed later by aides clarifying that Romney was not endorsing Rubio’s potential legislation.

Former Mississippi governor Haley Barbour, a top GOP strategist, told reporters that Romney’s past statements on immigration allowed Democrats to label him anti-immigrant. “I would just have a different policy from what he has espoused,” Barbour said of Romney.

Eligible immigrants will now receive “deferred action,” which essentially means a two-year reprieve from deportation along with the chance to apply for a work permit. The decisions will be made on a case-by-case basis, and officials said Friday that not everyone granted the reprieve will immediately gain the right to work.

The deferral will be available to immigrants who can prove that they came to the United States when they were younger than 16, have lived in the country continuously for at least five years and are currently in the country. They must be in school, have graduated from high school, have obtained a general education development certificate, or be honorably discharged veterans of the military or the Coast Guard.

They also must not be older than 30 and must never have been convicted of a felony, a significant misdemeanor, multiple misdemeanor offenses or otherwise pose a threat to national security or public safety.

The change was not imposed by executive order. Instead, it effectively extends an existing policy of “prosecutorial discretion,” in which immigration officials last year were instructed to prioritize the removal of felons, repeat border crossers and others considered to be security risks. Officials said the government would continue its aggressive enforcement policies but with greater care not to remove young people who came as children.

The administration announced the new policy a week before Obama was scheduled to address the National Association of Latino Elected and Appointed Officials’ annual conference near Orlando. Romney is scheduled to speak to the group Thursday, as are Rubio and former Florida governor Jeb Bush, a Dream Act supporter who has also urged the GOP to soften its rhetoric on immigration. It also comes in advance of a Supreme Court ruling on the controversial Arizona immigration law.

Arturo Vargas, executive director of the NALEO group, said Friday he was unsure whether the policy would have the effect that advocates had hoped for, noting that immigrants would have to step forward to apply with no guarantee of success.

“People are getting more excited than what really is there,” Vargas said.

Still, the response Friday was overwhelmingly positive from immigration advocates, particularly those who had personally sparred with Obama over the past two years.

“If what we heard [Friday] is exactly what happens, it was about time,” said Angelica Salas, a Los Angeles-based activist who first confronted Obama about the deportations during a March 2010 meeting in the Roosevelt Room.

Obama is “putting his political power behind this,” said Gaby Pacheco, 27, an activist who came to the United States from Ecuador when she was 7 and went on to graduate from college and prepare for a career in teaching. ”We’re close to an election, and so I don’t think that they’re going to mess this up.”

Pacheco, who had been working with Rubio on his legislation, said she planned on applying for the “deferred action” reprieve. She hoped the policy would pressure Congress to act.

“It’s inevitable for us to eventually become citizens of this country,” she said.

And if that happens, said Pacheco, who lives in Miami, she might just run for Congress someday.

Staff writer Philip Rucker contributed to this report.