Moments after Gov. Jan Brewer signed Arizona's controversial new immigration law Friday, opponents promised legal challenges and economic sanctions against a state still reeling from the housing meltdown.

Before and after Senate Bill 1070 became law at 1:30 p.m., civil unrest punctuated by loud protests and several minor clashes took place at the state Capitol, where more than 1,500 people gathered to chant, pray and either praise or castigate the Republican governor.

At least four protesters were arrested, several after hurling water bottles at police officers in riot gear.

Brewer, who faces a stiff primary challenge and needs conservatives to keep her in office, said the law represents another tool for the state to "work to solve a crisis we did not create and the federal government has refused to fix - the crisis caused by illegal immigration and Arizona's porous border."

The legislation put Arizona in the national spotlight, with President Barack Obama weighing in on it earlier in the day and cable-news giant CNN broadcasting live Brewer's signing and the Capitol demonstrations.

Even the Mexican government issued a formal statement, saying it "laments that Arizona lawmakers and the executive branch didn't take into account immigrants' contributions - economically, socially and culturally."

"The criminalization isn't the path to resolve the undocumented-immigration phenomenon," the statement added.

The legislation has widespread support among Arizonans, according to one recent poll, but Latino leaders compared the bill to apartheid in South Africa and the internment of Japanese-Americans during World War II. A handful of teenage girls, among the hundreds of high-school students attending a Statehouse rally, openly wept after it was announced that Brewer signed the bill.

"This is the most reprehensible thing since the Japanese internment," said Alfredo Gutierrez, a former state senator and community leader. "This is the saddest day for me. It's shameful."

Arizona's immigration law, now considered the toughest in the nation, makes it a state crime to be in the country illegally and requires local police to enforce federal immigration laws. It will require anyone whom police suspect of being in the country illegally to produce "an alien registration document," such as a green card or other proof of citizenship, such as a passport or Arizona driver's license.

It also makes it illegal to impede the flow of traffic by picking up day laborers for work. A day laborer who gets picked up for work, and traffic is impeded in the process, would also be committing a criminal act.

The law goes into effect 90 days after the current legislative session ends, likely in early May.

Sen. Russell Pearce, R-Mesa, the bill's sponsor, called it "a good day for America," saying the law is reasonable.

Best for Arizona

After receiving intense pressure from both sides during the past week, the governor stepped to a lectern in a crowded room near the Capitol and said she would sign SB 1070 into law.

"This bill strengthens the laws of our state, protects all of us, every Arizona citizen," she said. "It does so while ensuring that the constitutional rights of all remain solid, stable."

Brewer said that she listened patiently to supporters and opponents and that, although "many people disagree, I firmly believe it represents what's best for Arizona." She criticized the federal government for a lack of action to secure the border, and she said her signature provided "security within our borders."

"We cannot sacrifice our safety to the murderous greed of drug cartels," Brewer said. "We cannot stand idly by as drophouses, kidnappings and violence compromise our quality of life."

Brewer insisted that protections built into the bill and training she has requested from the Arizona Peace Officer Standards and Training Board will protect citizens against discrimination based on race or color. Yet law enforcement has been split over the bill, with many rank-and-file officer groups supporting it and the police chiefs association opposing it.

Maricopa County Sheriff Joe Arpaio is among the supporters who believe it will give officers more tools to detain illegal immigrants.

Critics suggest the law opens the door for police to make unreasonable stops based on skin color or a lack of English fluency if there's probable cause to believe someone is in America illegally.

"We've got some very serious crime problems out there, and this bill does not address them. It does not give us tools to go after criminals that are part of the cartels," said Attorney General Terry Goddard, a Democrat who is running for governor.

The faith community also weighed in, with clergy criticizing the law and calling for calm.

Inside a chapel at Queen of Peace in Mesa, a congregation gathered for a monthly healing Mass.

Father Charlie Goraieb comforted his congregation, saying in Spanish, "It's going to be all right."

His parish is 60 percent Latino.

"It's a terrible situation and a reflection of fear and overreaction and total loss of perspective and how we are as a people and as a nation," he said before Mass.

Josefina Martinez, 56, of Phoenix, said, "I lived here for 25 years. I never had to deal with this. It's not fair."

Earlier in the day, Rabbi Maynard Bell, the Arizona office of the American Jewish Committee's area director, said the law makes a laughingstock of the state and does nothing to make the border with Mexico more secure.

"It's going to cost the state economically. It's going to tarnish the state's image. It's a lamentable day for Arizona," Bell said. "I don't think it will stand up to legal tests."

Legal fights

Just after Brewer signed the bill, opponents promised legal and economic fights.

Phoenix Mayor Phil Gordon said he will ask the City Council on Tuesday to consider suing the state on grounds the new immigration law is unconstitutional and unenforceable.

The American Civil Liberties Union and the Mexican American Legal Defense and Educational Fund, a civil-rights group, promised to fight implementation of the law by challenging its constitutionality. But the ACLU said the timing and strategy have to be worked out.

"We are definitely planning on filing a lawsuit," said Alessandra Soler Meetze, the group's Arizona executive director. "This is a direct attempt by Arizona to regulate immigration laws. And it's forbidden by the federal government."

Bill opponent Rep. Kyrsten Sinema, D-Phoenix, said that the legislation violates the rights of all Arizonans and that a legal team will seek an injunction to keep the law from being implemented.

Gutierrez said he will lead efforts for economic sanctions against Arizona. He declined to disclose details, but one proposed sanction would include boycotts by out-of-state tourists.

Capitol protests

At the Capitol, demonstrators exchanged catcalls after Brewer's announcement, and roughly 80 police officers from the Capitol Police, the state Department of Public Safety and the Phoenix Police Department worked to maintain order.

There were at least two breakouts of unruly behavior. One occurred when a white-haired man with a beard agitated demonstrators opposing the bill. Police tried to calm the crowd as it closed around the man, who was escorted away. Dozens of demonstrators ran into the streets, and police formed a long human barrier on West Jefferson Street just south of the Capitol complex.

Amid shouting and chanting all day, police made sure the sides were separated. Supporters of the bill stayed in the courtyard between the House and Senate buildings, guarded by police and roped off with police tape.

Supporter Terry Irish of Chandler was elated when Brewer announced her decision.

"This thing wouldn't be happening if they had sealed our borders," Irish said.

Those leading the rally urged protesters to follow the example of civil-rights leader Cesar Chavez, who in 1972 led the unionization of farmworkers in direct opposition to Arizona law. They also urged peaceful opposition, and despite several flare-ups, no serious injuries were reported.

In southern Arizona, however, U.S. Rep. Ra�l Grijalva, who opposed the law, closed his offices at noon after receiving multiple threats.

Arizona has about 460,000 undocumented immigrants, according to the U.S. Department of Homeland Security. Currently, immigration offenses are violations of federal law, something most local law-enforcement agencies cannot enforce.

Pearce, the Mesa Republican, has been working with groups across the state and nation for years to craft legislation that would toughen enforcement.

Republic reporters Scott Wong, Sadie Jo Smokey, Casey Newton, Mary Jo Pitzl and Angelique Soenarie contributed to this article.