President Obama is preparing to announce new measures that would potentially allow millions of illegal immigrants to remain in the United States without fear of deportation, a politically explosive decision that could jolt Washington just weeks before the midterm elections, according to people who have been in touch with the White House.

Administration officials have told allies in private meetings that both the current surge of Central American children crossing the border and Congress’s failure this year to pass a broader immigration overhaul have propelled the president toward taking action on his own by summer’s end.

Obama aides have discussed a range of options that could provide legal protections and work permits to a significant portion of the nation’s more than 11 million undocumented residents, said Democratic lawmakers and immigrant advocates who have met recently with White House officials. Ideas under consideration could include temporary relief for law-abiding undocumented immigrants who are closely related to U.S. citizens or those who have lived in the country a certain number of years — a population that advocates say could reach as high as 5 million.

Some Senate Democrats running for reelection in traditionally conservative states, such as Arkansas and Louisiana, have expressed misgivings about Obama going too far on his immigration order, fearing it will not play well among voters in their states.

But supporters of executive action said the president has little to lose by embracing a broad legalization program that could become a signature achievement in a second term defined by legislative gridlock on Capitol Hill.

Though politically charged, such a move would allow Obama to present a sharp contrast with Republicans — who have remained staunchly opposed to loosening immigration enforcement — and cement Hispanic support for the Democratic Party for years to come, supporters said.

Obama appeared to relish the differences between the two parties that were evident Friday, as the Republican-led House struggled to pass a border funding measure and then voted to roll back Obama’s 2012 program that deferred deportations of many immigrants who had been brought to the country illegally as children. Obama’s program has been popular with Hispanic voters and was seen as a key factor in his ability to win 70 percent of that crucial electorate in his reelection.

Calling the House measure “extreme and unworkable,” Obama signaled in a news conference that he believes Congress has opened the door for him to act.

“House Republicans suggested that since they don’t expect to pass a bill I can sign, that I should go ahead and act on my own to solve the problem,” Obama said.

The anticipation that Obama is preparing to sign off on a major expansion of the 2012 relief program — which has delayed deportations of more than 550,000 younger immigrants — has prompted Republicans to begin framing such a move as more evidence of an imperial White House intent on circumventing Congress.

The House GOP already has approved a lawsuit accusing Obama of abusing his authority, focused on the administration’s implementation of his signature health-care law. Sen. Jeff Sessions (R-Ala.), a leading opponent of loosening immigration laws, warned this week that a large-scale “administrative amnesty” would trigger a confrontation with Congress, saying in a floor speech: “Do not do this, Mr. President. You cannot do this.”

White House officials emphasized that Obama has not made a final decision, noting that aides are still working on a formal menu of options for him on potential policy changes. But the president’s general counsel, chief domestic policy adviser and Homeland Security secretary have been closely involved with the internal deliberations, as the administration maps out the implications of the president’s next move.

During a series of private meetings at the White House, Obama’s advisers have peppered immigration lawyers and advocates with questions in an attempt to define a broader population of immigrants that might be eligible for a similar kind of relief that was granted to the young immigrants in 2012, a program called Deferred Action for Childhood Arrivals.

The discussions, according to those involved, have included a focus on the estimated 4 million to 5 million illegal immigrants whose children are either U.S. citizens or current beneficiaries of the 2012 deferred action program. Another area of focus was on how long an immigrant must live in the United States to establish deep ties.

“They didn’t say no to the things we were raising,” said Marielena Hincapié, executive director of the National Immigration Law Center, who attended one of the meetings last week. “The conversation was about the need for the program to be as bold as possible.”

Hispanic lawmakers and labor leaders also have urged Obama and his top aides to pursue a broad legalization. Additional support could come from business leaders should Obama decide to use his executive powers to make more foreign-worker visas available for high-tech and agriculture firms.

Lawmakers and activists have argued that the political upsides far outweigh the potential backlash from critics.

“The president is going to get the same amount of grief from the right no matter what he does, whether it’s small or whether it’s bold,” said Richard L. Trumka, president of the AFL-CIO, which has been aligned with immigration advocates. “The difference is, if it’s small, it’s not going to energize his base. If it’s bold, it will.”

Administration lawyers are examining complicated legal questions in assessing just how far the president can go to replicate the deferred-action program he put in place in 2012 for young people.

That initiative allows immigrants who arrived as children before 2007 to apply for two-year waivers on their deportations and gain work permits and, in some cases, drivers’ licenses. But while children are less culpable for their parents’ decision to bring them to the United States illegally, the same argument cannot be made for the adults themselves.

Janet Napolitano, the former Homeland Security secretary, said in an interview that officials determined the program was legal because it applied discretion to a specific category in order to alleviate administrative backlogs and did not provide an across-the-board change in legal status. Additional administration policies called for prioritizing deportations of immigrants who had committed felonies or were seen as safety or security risks.

“The question was, ‘What can you do that’s not just blanket amnesty? What can you do within existing law?’ ” said Napolitano, now the president of the University of California system. The program “was an individual, case-by-case review, but it’s done for a category.”

The administration has ruled out protecting all of the nation’s undocumented immigrants. Congress has allocated resources to deport about 400,000 immigrants a year, and the Obama administration has averaged about that many, according to government statistics.

Inside the West Wing, there was renewed urgency after House Republicans feuded this week over providing emergency funding to deal with the influx of tens of thousands of foreign minors who have entered the country illegally this year. Obama and his aides have begun to make the case that the administration’s limited resources are better spent on the border crisis than deporting immigrants who have lived in the country for years and established deep ties here.

“That will create space for him to go big on administrative action,” said Frank Sharry, executive director of America’s Voice, an immigrant rights group. “It could be one of the defining moments of his second term, if not his presidency.”

Republicans “want to take away the single greatest victory for the immigrant rights movement in the last two decades,” said Lorella Praeli, director of advocacy for United We Dream. “I don’t think the president has any option to do anything other than something that’s big and bold.”