A federal judge sitting in south Texas and ruling at the 11th hour has thrown a judicial wrench into President Barack Obama’s attempt to normalize the lives of an estimated 5 million undocumented immigrants through executive orders.

The plan, which was forced on a frustrated White House by more than a decade of partisan congressional obstinacy over comprehensive immigration reform, was hours away from signing up eligible immigrants when Judge Andrew S. Hanen issued his hastily drafted 123-page opinion virtually in the middle of the night. Hanen, a George W. Bush appointee who previously has criticized the Obama administration’s enforcement of the immigration laws, issued a partisan ruling that strained to a partisan result in response to a suit by 26 mostly Republican state attorneys general.

The ruling also appears to have stiffened the resolve of immigration reform’s opponents in the House and Senate. Hard-line GOP members of both chambers have said they are willing to countenance a shutdown of the Department of Homeland Security whose budget reauthorization they have linked to provisions defunding the administrative mechanisms to implement the president’s executive orders. Senate Democrats have threatened to filibuster the Gerry-rigged measure and Obama has said he will veto anything but a clean bill reauthorizing Homeland Security’s $39 billion budget. As a result, that critical department may essentially shut down this coming Friday.

“The president has acted unconstitutionally, and it is the president — not Congress — who must back down,” Sen. Jeff Sessions, R-Ala., an adamant opponent of immigration reform, told the Politico website this week. His sentiments were echoed by Texas Sen. Ted Cruz, a leading Republican presidential hopeful. His colleague, Texas Sen. John Cornyn, the GOP’s majority whip, added that “the fight to reverse the president’s unconstitutional overreach is not over.”

Despite their insistence — and that of many vocal right-wing commentators — that Hanen’s baroque opinion validates conservative allegations that Obama has exceeded his constitutional authority, the judge did just the opposite, noting that the president enjoys broad powers to issue executive orders, particularly in this area. He also acknowledged that the Department of Homeland Security, which administers the immigration laws, “has virtually unlimited discretion when prioritizing enforcement objectives and allocating its limited resources.”

Hanen’s stay of the president’s orders is based, instead, on his belief that Obama violated the Administrative Procedure Act, which requires a period of “public comment” before altering federal agencies’ policies. By granting previously undocumented immigrants the right to work legally, Hanen argued, the administration had moved from enforcing the law to conferring a legal benefit, something that may be covered by the Administrative Procedures Act. Most leading legal scholars disagree, and the Obama administration said Friday it will seek a stay from the U.S. Court of Appeals for the Fifth Circuit in New Orleans. However it rules, the case seems destined now for the Supreme Court, which likely puts long-delayed immigration reforms on hold for months.

What we have here is but another example of GOP lawmakers — particularly those from the old Confederacy and a handful of Midwestern states — putting the sentiments of their relatively small but hard-right electoral base ahead of the broader nation’s common good — and the people of that broader nation take note. A recent CNN poll, for example, found that 53 percent of voters will blame the congressional Republicans for a shutdown of the Department of Homeland Security, while just 30 percent would hold Obama culpable.

More significant, a survey this month by Public Religion Research Institute, a nonprofit, nonpartisan study group that does unusually high-quality polling, found that, “Nearly three-quarters (73 percent) of Americans say Republicans in Congress should prioritize passing comprehensive immigration reform legislation over legislation that would overturn Obama’s immigration policies. Seventeen percent say Republicans in Congress should prioritize undoing Obama’s immigration policies.”

The poll found, moreover, that, “Support for prioritizing comprehensive immigration legislation crosses the political spectrum although strength of support varies. Eighty-five percent of Democrats, 73 percent of independents and 62 percent of Republicans express a preference for prioritizing comprehensive immigration legislation over undoing Obama’s immigration policies. Majorities of every major religious group also say Republicans in Congress should prioritize passing comprehensive immigration policies, including 78 percent of the religiously unaffiliated, 76 percent of minority Protestants, 73 percent of white mainline Protestants, 72 percent of Catholics, and 64 percent of white evangelical Protestants.”

The institute’s survey found broad support for the substance of Obama’s executive orders, including 68 percent approval of the Dream Act, which would shield undocumented immigrants brought here as small children from deportation. Six out of 10 Republicans say they support this policy. Fifty-nine percent of Americans support a path to citizenship for the undocumented and 59 percent say all immigrants strengthen the U.S. economy.

Against this factual backdrop, the congressional Republicans lemming-like rush toward the demographic abyss of national marginalization speaks to the current dysfunction of our self-absorbed electoral democracy with its predilection to elevate assertion and wishful thinking over reason and facts. It also pointedly ignores the historical experience of California — the nation’s largest and most economically powerful state — where the GOP’s all-in support of the anti-immigrant Proposition 187 set in motion forces that have made this virtually a one-party state.

California is home to an estimated 2.6 undocumented immigrants, about a quarter of the national total. More than 1.8 million of them are a vital part of our labor force. Living and laboring alongside these hardworking newcomers, at least 1 million of whom would benefit from Obama’s executive orders, has convinced 76 percent of Californians that they ought to have a path to citizenship. About half the state’s immigrants without papers reside, work, own homes and go to school in Southern California, which is why leading local congressional representatives like Judy Chu and Maxine Waters this week took part in protests calling Hanen’s ruling shameful. “We’re not giving up on these Dreamers,” Waters said. “We’re not giving up on people who have given so much to this country.”

Gov. Jerry Brown, who has made driver’s licenses and places in California’s higher education available to immigrants, whatever their status, declared that his administration “stands firmly with the White House. Further delay will not fix our broken immigration system.”

Insisting on such delay, as the congressional Republicans appear bent on doing, flies in the face of both sensible public sentiment and California’s historical experience. It is both bad policy and bad politics.

Tim Rutten is a columnist for the Los Angeles News Group. ruttencolumn@gmail.com.