President Barack Obama has defended his plan to shield millions of undocumented migrants from deportation and vowed to “aggressively” push back against Republican-driven opposition.

Speaking amid a high-stakes immigraton battle in Washington that could cripple the Department of Homeland Security, the president told a town hall meeting in Florida on Wednesday that undocumented people should prepare paperwork for deportation relief applications despite a Texas judge freezing the plan.

“This is just one federal judge. We have appealed it very aggressively. We’re going to be as aggressive as we can,” he told an audience at Florida International University.

Judge Andrew Hansen issued the injunction earlier this month after 26 Republican-led states argued that the president’s executive action was illegal.

Obama taunted Republicans over possible electoral punishment for opposing immigration reform. “When they start asking for votes, the first question should be, ‘Are you really going to deport 11 million people? If not, what’s your plan?”

Florida is a swing state with a large Latino constituency which could tilt the 2016 presidential race.

Obama said he would veto attempts by GOP leaders to halt his executive orders through a funding bill for the Department of Homeland Security, which runs out of funding at midnight on Friday if no deal is struck. He repeatedly accused Republicans of blocking immigration legislation to resolve the status of the US’s 11 million undocumented immigrants and defended the legality of his executive action.

“In the short term if Mr [Mitch] McConnell, the leader of the Senate, and the Speaker of the House, John Boehner, want to have votes over whether what I’m doing is legal or not they can have that vote. I will veto that vote because I’m absolutely confident it’s the right thing we do.”

As the president spoke in south Florida, Republicans and Democrats in Washington wrangled over a looming shutdown of the Department of Homeland Security (DHS), the latest front in the immigration debate.

Senate leaders inched towards a potential deal before funding for the department runs out at midnight on Friday, a spectre which chills moderate Republicans, who fear the GOP will be blamed, but not conservative colleagues, who consider it leverage over the president’s immigration reform.

Senate Democrats agreed on Wednesday to not block a bill proposed by the Republican majority leader, Mitch McConnell, which would give no-strings-attached funding for the DHS.

McConnell’s plan would allow the Senate to act separately to reverse Obama’s executive action shielding five million undocumented migrants from deportation - legislation inviting a presidential veto should it pass both chambers of Congress.

The Senate passed an initial procedural vote to open debate on the DHS funding 98-2.

“We hope that we can do this tomorrow,” the minority leader, Harry Reid, told reporters on Capitol Hill. “We are going to do everything we can to make sure that it passes in time: this is no time for games.”

McConnell may need Democrat help to speed the funding legislation to the Senate floor amid continued grumbling on the right of his party. Such a pattern is expected to be repeated in the House if, as expected, the House majority leader, John Boehner, softens opposition and allows a vote on a “clean” funding bill later this week.

Earlier on Wednesday two former secretaries of homeland security from the Bush era, Tom Ridge and Michael Chertoff, flanked the current secretary, Jeh Johnson, and urged Congress to avert a partial shutdown.

Johnson warned it would result in “concrete dramatic consequences”. Ridge said he believed Obama had gravely overreached his authority on immigration reform and and that Republicans were entitled to challenge that but pleaded with them to leave DHS funding out of it.

Chertoff said personnel would be forced to work without pay and that 15% of employees would be sent home, triggering a suspension of services that help keep the US safe, such as the ability to provide natural disaster aid.

In Florida many Latinos said their concern centred on the fate of Obama’s immigration reform, which hangs in the balance.

Nora Sandigo, the “Florida fairy godmother” who is the legal guardian to more than 800 American children of undocumented parents, said the uncertainty worried the community.

“We don’t know how to explain to the families what is happening.”

In November, Sandigo hosted a massive viewing party at her Miami ranch for the families to watch Obama unveil his plan to offer temporary legal status to five million older undocumented migrants, including many of “her” children’s parents.

“It was a beautiful day,” Sandigo remembers. “We listened to the announcement and the children were so happy.”

The Texas court’s decision to temporarily block the plan jarred the community, she said. “In one second everything changed. It is horrible.”

Sandigo said she understood lawmakers faced intense political pressure, but said there would be consequences at the ballot box for those who attempted to block reform.