Mexico on Tuesday asked a federal court in Arizona to declare the state's new immigration law unconstitutional, arguing that the country's own interests and its citizens' rights are at stake.

Lawyers for Mexico on Tuesday submitted a legal brief in support of one of five lawsuits challenging the law. The law will take effect July 29 unless implementation is blocked by a court.

The law generally requires police investigating another incident or crime to ask people about their immigration status if there's a "reasonable suspicion" they're in the country illegally. It also makes being in Arizona illegally a misdemeanor, and it prohibits seeking day-labor work along the state's streets.

Until recently, Mexican law made illegal immigration a criminal offense -- anyone arrested for the violation could be fined, imprisoned for up to two years and deported. Mexican lawmakers changed that in 2008 to make illegal immigration a civil violation like it is in the United States, but their law still reads an awful lot like Arizona's.

Arizona's policy, which President Felipe Calderon derided during a recent U.S. trip as "discriminatory," states police can't randomly stop people and demand papers, and the law prohibits racial profiling.

Mexican law, however, requires law enforcement officials "to demand that foreigners prove their legal presence in the country before attending to any issues."

Amnesty International recently issued a report claiming illegal immigrants in Mexico -- typically from Central America -- face abuse, rape and kidnappings, and that Mexican police do little to stop it. When illegal immigration was a criminal offense in Mexico, officials were known to seek bribes from suspects to keep them out of jail.

But Mexico said it has a legitimate interest in defending its citizens' rights and that Arizona's law would lead to racial profiling, hinder trade and tourism, and strain the countries' work on combating drug trafficking and related violence.

Citing "grave concerns," Mexico said its interest in having predictable, consistent relations with the United States shouldn't be frustrated by one state.

"Mexican citizens will be afraid to visit Arizona for work or pleasure out of concern that they will be subject to unlawful police scrutiny and detention," the brief said.

It will be up to a U.S. District Court judge to decide whether to accept the brief along with similar ones submitted by various U.S. organizations.

Arizona Gov. Jan Brewer, who signed the law on April 23 and changes to it on April 30, has lawyers defending it in court.

In a statement issued late Tuesday, Brewer said she was "very disappointed" to learn of Mexico's filing and reiterated that "Arizona's immigration enforcement laws are both reasonable and constitutional."

"I believe that Arizona will ultimately prevail and that our laws will be found constitutional," Brewer added.

Brewer and other supporters of the bill say the law is intended to pressure illegal immigrants to leave the United States. They contend it is a needed response to federal inaction over what they say is a porous border and social problems caused by illegal immigration. They also argue that it has protections against racial profiling.

Mexican officials previously had voiced opposition to the Arizona law, with Calderon saying June 8 that the law "opens a Pandora's box of the worst abuses in the history of humanity" by promoting racial profiling and potentially leading to an authoritarian society

U.S. officials have said the Obama administration has serious concerns about the law and may challenge it in court. Secretary of State Hilary Clinton recently went further by saying a lawsuit is planned.

The Associated Press contributed to this report.