The government will seek a stay of a judge's decision that has temporarily blocked President Obama's action to protect millions of immigrants from deportation, the White House said Friday.

The Justice Department paperwork will be filed with a federal court in Texas by Monday, said White House spokesman Josh Earnest.

Earnest said the decision to seek a stay is separate from the administration's plan to appeal Monday's ruling by U.S. District Judge Andrew Hanen in Texas. He said Obama's advisers believe the president acted within his rights last year when he used his executive authority to spare from deportation as many as 5 million people who are in the U.S. illegally.

The judge's ruling came in response to a lawsuit against Obama's actions that was filed by a coalition of 26 states, led by Texas. The states argued that the president does not have the authority to allow the groups of immigrants to legally stay and work in the United States.

"The law is on our side, and history is on our side," Obama said earlier in the week in response to the judge's ruling. "This is not the first time where a lower court judge has blocked something or attempted to block something that ultimately is going to be lawful, and I'm confident that it is well within my authority."

The White House has said it will appeal the judge's ruling to the U.S. Court of Appeals for the Fifth Circuit in New Orleans.

Congress is effectively stuck on how to fund the Department of Homeland Security past the end of the month -- and the immigration actions are the sticking point.

Republicans want a bill that would both fund DHS and undo Obama's immigration directives. Democrats, though, want a bill to only fund DHS, with no immigration strings attached -- they want to keep Obama's immigration program in place, and don't think the issue should be debated within a budget bill, anyway.

Senate Democrats repeatedly have blocked a House-passed bill that includes the immigration provision. Each chamber is now waiting for the other to act, with the Feb. 27 funding deadline fast approaching.

But Republicans see this week's court order as a boost for their side, and are using it to urge Democrats to drop their resistance to the bill.

"The Senate Democrats who are filibustering Department of Homeland Security funding should look hard at this ruling," Cruz said.

GOP leaders of the House and Senate hit the same argument.

House Speaker John Boehner -- who over the weekend told "Fox News Sunday" that "the House has acted" and he's prepared for a possible partial DHS shutdown -- said in a statement: "Hopefully, Senate Democrats who claim to oppose this executive overreach will now let the Senate begin debate on a bill to fund the Homeland Security department."

Senate Majority Leader Mitch McConnell, R-Ky., likewise urged his Democratic counterparts to "end their partisan filibuster of Department of Homeland Security funding."

The Associated Press contributed to this report.