Mexico is reacting angrily to a controversial immigration bill that was panned by President Barack Obama but signed into law Friday by Arizona Gov. Jan Brewer (R).

The law requires police to ask for identification or other proof of immigration status if they suspect that they're in the country illegally. A corrdidor for both drug and human smuggling, Arizona is home to an estimated 460,000 illegal immigrants, and proponents of the law argue that the federal government has dropped the ball in securing the border.

Critics contend that the bill will lead to racial profiling and civil rights abuses. Hours before Brewer signed the legislation, which passed nearly along party lines in the state Senate, Obama criticized the effort as “misguided” and said it “threatened to undermine basic notions of fairness that we cherish as Americans, as well as the trust between police and their communities that is so crucial to keeping us safe.”

Secretary of Foreign Affairs Patricia Espinosa said that the Mexican government concurs.

"The government of Mexico regrets that, despite the overtures made at all levels by Mexican federal and state officials, the legislators who passed this measure and the governor of Arizona have not taken into account the valuable contributions of migrants to the economy, society and culture of Arizona and the United States of America," Espinosa said. "The Mexican government took various steps to express to the Arizona government its concerns about the law without obtaining a positive response.

"The government of Mexico acknowledges the sovereign right of every country to decide on the public policies that should apply in their territory," she continued. "Nevertheless, when a measure such as SB 1070 has the potential of affecting the human rights of thousands of Mexicans, the Mexican government cannot remain indifferent."

The Mexican Senate had unanimously passed a resolution Thursday urging Brewer to veto the law.

"Criminalization is not the way to resolve undocumented immigration," Espinosa said. "The existence of cross-border labor markets requires comprehensive, long-term solutions. Shared responsibility, trust and mutual respect must be the bases for addressing the shared challenges in North America."