Immigration reform was on its last legs even before Rep. Eric Cantor’s defeat was (incorrectly) deployed as a political warning against comprehensive reform. Whatever faint hope there was for a deal in this presidency is vanishing in the midst of a border fiasco largely of President Obama’s making, a misstep that muddies his accusation that the GOP is to blame for the lack of comprehensive reform.

President Obama, accompanied by Vice President Joe Biden, speaks about immigration reform on June 30 at the White House. (Charles Dharapak/Associated Press)

Before the calamity at the border, the president had a simple argument: He and a bipartisan majority in the Senate were for immigration reform; a right-wing rump in the House was holding up comprehensive reform. House Speaker John Boehner, who plainly wants immigration reform to get done, was reduced to claiming that Congress couldn’t act to pass a new law so long as Obama kept changing the current ones by fiat. The argument didn’t entirely make sense given that reform could kick in after Obama leaves and, in any event, Obama without congressional action would continue to act unilaterally and cast the Republicans as anti-immigrant.

That changed when thousands rushed to our border, including flocks of unaccompanied minors. A GOP senior aide remarked to me, “I think it is fair to say that his executive order on DREAM-ers is partially if not fully responsible for the current humanitarian crisis.” The aide contends Obama’s announcement that he will shift resources to the border “is largely a ruse to give him more space for executive action to ease up on the deportations, which again is only going to make the problem worse and not better.”

If nothing else, the border pileup has strengthened Republicans’ argument that border security must precede other aspects of reform. Even Obama now effectively concedes the point by trying to address the border emergency before offering anything to his frustrated base.

Meanwhile, Texas is one state on the front lines. Gov. Rick Perry (R), a potential 2016 contender, was forced to get emergency funding from the legislature. In a moving op-ed this week, he explained the real-world situation:

The very real human consequences of our country’s lax border security and muddled immigration policies huddled right there, under an open shelter in the stifling Texas heat.

This is the McAllen border patrol detention facility, where men, women and children of all ages who have illegally entered the United States are detained and processed. Some are caught attempting to cross the border; some give up willingly. Many are children from Central America traveling alone. Some have paid coyotes to smuggle them through Mexico or have made the trip on the tops of freight trains. All have risked their lives to set foot in our country.

It’s impossible to see these children without wondering how many more were lost somewhere along the way. The desert’s a dangerous place to begin with, even before the worst of summer’s brutal heat arrives, and the border is trafficked by treacherous individuals who see fellow humans as an expendable means to turn a dollar.

He wants the feds to “make it crystal clear that attempting to cross our border illegally simply isn’t worth the considerable risk,” and he wants action on the border. (“The U.S. government needs to send more resources to finally, once and for all, secure the border. Federal engagement was insufficient to begin with and the crush of illegal entrants is draining what resources they have in the area. These gaping holes are just waiting to be exploited by drug cartels and transnational gangs. They also create a national security issue as they could be used by people from countries with known terrorist affiliations.”)

Had Obama not moved unilaterally to protect a group of DREAMers from deportation, it is unclear where he and the immigration debate would stand currently. What we do know is that 1.) it fed the narrative that he is an overreaching executive who can’t work with Congress and 2.) heightened fears that immigration “reform” is going to make borders less, not more, secure.

The good news is that the crisis may make demands for serious and verifiable border security first, then legalization, the only acceptable position for either party. That conceivably could provide sufficient reassurance to nervous Republicans and provide the basis of a future deal. So long as the border is out of control, even this president will be loath to signal tolerance for illegal immigration.

In the larger scheme of things, this becomes one more presidential failure along with Obamacare, his foreign policy debacles and a raft of scandals. With losses at the Supreme Court on recess appointments and the Obamacare contraception mandate, the president seems to be shrinking before our eyes. And now with the border emergency, we have one more vivid example of the federal government’s inability to perform its core functions. We shouldn’t be surprised – all this is par for the course in the second Obama term.