WASHINGTON — The government will seek a stay of a judge’s decision that has temporarily blocked President Barack 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.