(CNN) -- The Justice Department has filed suit challenging Alabama's new immigration law, which is set to take effect September 1.

In documents filed in the Northern District Court of Alabama on Monday, the Justice Department said that various provisions of HB 56 undermine immigration enforcement priorities and objectives of the federal government.

"While the federal government values state assistance and cooperation with respect to immigration enforcement, a state cannot set its own immigration policy, much less pass laws that conflict with federal enforcement of the immigration laws," the Justice Department said in a statement.

The law is also the target of a class-action lawsuit filed last month by several prominent civil rights groups.

The Mexican government welcomed the Justice Department's move.

"The Government of Mexico acknowledges the sovereign right of all countries to enact laws and implement public policies in their own territory," the Mexican Embassy in Washington said. "At the same time, it reiterates its unwavering commitment to protect, by all available means, the rights and dignity of Mexicans abroad, especially in the case of laws that could lead to the violation of the civil and human rights of our nationals."

The Alabama legislation was passed and signed by Gov. Robert Bentleyin June.

According to a fact sheet presented by Alabama House Republicans, the measure requires law enforcement officers "to attempt to determine the immigration status of a person who they suspect is an unauthorized alien of this country."

The legislation also makes it a criminal offense to transport or house an illegal immigrant. The state will be required to check the citizenship of students, and any business that knowingly employs an illegal immigrant will be penalized.

"Gov. Bentley campaigned on the need for a strong immigration bill," Bentley's spokeswoman Rebekah Mason said last month. "The legislature passed that bill, and the governor signed it."

The Justice Department said the law is designed to affect "virtually every aspect of an unauthorized immigrant's daily life, from employment to housing to transportation to entering into and enforcing contracts to going to school."

It said the law may also result in the harassment and detention of foreign visitors, legal immigrants and U.S. citizens who may not be able to readily prove their lawful status.

While immigration has long been a federal responsibility, other anti-illegal immigration measures have been passed in recent months in Arizona, Utah, Georgia, Indiana and South Carolina. Parts of those laws have been suspended in four of those states, pending resolutions to lawsuits.

In June, a federal judge struck down a key part of the Georgia law, ruling police cannot inquire about immigration status when questioning suspects in certain criminal investigations.

Republican Alabama state Rep. John Merrill told CNN in June that the legislation is "good for Alabama" because it will reduce illegal immigration to the state and "provide equal opportunities for all people who want to come to Alabama legally."

He rejected suggestions the law is discriminatory, saying he is confident it was drafted in such a way that it will survive legal challenges.