Mr. Trump said he would deport all 11 million undocumented immigrants, then selectively allow some to return. Ben Carson, the pediatric surgeon in the Republican race who has seen a recent rise in the polls, also said he would consider mass deportation of all immigrants in the country illegally.

“If anybody knows how to do that, I would be willing to listen,” Mr. Carson said. “I think it’s worth discussing.”

The debate also highlighted the divide among Republicans themselves, with former Gov. Jeb Bush and Senator Marco Rubio, both of Florida, arguing against mass roundups and in favor of some path to legal status.

Image New citizens are sworn in during a naturalization ceremony in August in Washington. Credit... Alex Wong/Getty Images

Some Republicans said they were concerned about political overtones in the campaign.

“I think it’s healthy for a democracy for people to become citizens,” said Alfonso Aguilar, executive director of the American Principles Project’s Latino Partnership. “Sadly, I think the administration went overboard. A full-fledged campaign from the White House telling people to become a citizen, I think it is politicizing the naturalization process.” Mr. Aguilar, a Republican, was head of the citizenship office at the immigration agency for six years under the administration of President George W. Bush. He urged Congress to keep an eye on the campaign to make sure it did not go beyond civics education.

Mr. Obama’s citizenship campaign is part of a package of executive actions first announced in November. The most ambitious of them, a plan to provide protection from deportation and work permits to about five million undocumented immigrants, was challenged in a lawsuit by 26 states and has been blocked in the courts.

For now, White House officials have turned to the citizenship drive, which offers nothing for immigrants without legal status. To be eligible for naturalization, immigrants must have been legal permanent residents for at least three years and, in most cases, five years. The officials insisted the effort was nonpartisan.