Washington (AFP) - A US federal judge handed a victory to President Barack Obama, throwing out a lawsuit over controversial actions he took last month shielding millions of undocumented migrants from deportation.

The suit brought by Joseph Arpaio, the conservative sheriff of Maricopa County, Arizona, challenging the constitutionality of the president's actions, was dismissed by Judge Beryl Howell.

"The plaintiff's case raises important questions regarding the impact of illegal immigration on this nation, but the questions amount to generalized grievances which are not proper for the judiciary to address," Howell's ruling in the case read.

The White House late Tuesday praised the court's finding.

"Judge Howell's decision today confirms what the Department of Justice and scholars throughout the country have been saying all along: the president's executive actions on immigration are lawful," said Principal Deputy Press Secretary Eric Schultz in a statement.

"The Supreme Court and Congress have made clear that federal officials can set priorities in enforcing our immigration laws, and the actions announced by the president are consistent with those taken by administrations of both parties for the last half century," Schultz said.

"The court correctly dismissed Sheriff Arpaio's lawsuit."

Pledging to fix America's "broken" immigration system, Obama last month offered five million undocumented migrants protection from deportation, allowing families to emerge from the shadows and seek work permits.

In a move that infuriated legions of his Republican critics, Obama said nearly all undocumented people living in the country for more than five years, and who have a child who is a US citizen or legal permanent resident, can apply for three-year work authorization.

The president also broadened the program he launched in 2012 that provides temporary residency to young undocumented immigrants who arrived in the United States before the age of 16.

Story continues

The order affects about 44 percent of the 11.3 million people -- mostly from Mexico and Central America -- living in the United States illegally.

Republicans insist that Obama has exceeded his presidential powers in easing up on the deportations.

Blasting the move as "illegal" and "unconstitutional," they have vowed to find a way to block it in Congress and in the courts.