Legislators ban race from being used by police as a factor to identify illegal immigrants and require scrutiny only of people who police stop, detain or arrest.

Reporting from Phoenix — — The Arizona Legislature has narrowed a controversial immigration law in response to allegations that the measure legalized racial profiling and forced police to determine the immigration status of everyone they encountered on the streets.

The initial law, signed by Gov. Jan Brewer last week, required police to determine a person's immigration status if officers formed a reasonable suspicion about their legality during any "lawful contact." That led to suggestions by some legal experts that police would be obligated to scrutinize even people who asked for directions. A Phoenix police officer who patrols an area near a school sued, contending that it would require him to ask children he encounters during the day if they are in the country legally.

Lawmakers on Thursday night changed the language to require scrutiny only of people who police stop, detain or arrest. They also changed a section of the bill that barred officers from "solely" using race as grounds for suspecting someone is in the country illegally; opponents had argued that that would allow race to be a factor. The legislators removed the word "solely" to bar race from being used by officers enforcing the law.

"It absolutely clarifies what the intent was," said Paul Senseman, a spokesman for Brewer, who supported the changes and is expected to sign them into law. "It's undeniable now that this bill will not lead to racial profiling."

Opponents of the bill, who to date have filed three federal lawsuits against it and promise more, said the changes would make little difference.

"They're nice cosmetic changes," former state Sen. Alfredo Gutierrez said Friday during a news conference at which activists called for a boycott against Arizona and companies based in the state. "But they're insufficient."

The Arizona law, which also makes it a state crime to lack immigration papers, is the toughest measure against illegal immigration in the nation. It has been denounced by a wide range of people, including President Obama and Colombian pop star Shakira. In a Gallup poll, 51% of Americans who'd heard of the Arizona law supported it; 39% of those who had not heard of the law supported it. Its backers say it is needed to stem the tide of illegal immigration into Arizona, the favored gateway across the Mexican border.

Arizona lawmakers said they acted only because the federal government had failed to secure the border. "We are defenseless," said state Rep. John Kavanagh, a co-sponsor. "We have no choice but to increase our enforcement."

Lawmakers on Thursday night also added a provision extending immigration enforcement to local ordinances, which critics warned could permit police to check the immigration status of people guilty of nothing more than a poorly tended lawn.

Latino groups hope the threat of boycotts will force a repeal of the law, much as it did the state's refusal to recognize the Rev. Martin Luther King Jr.'s birthday in the early 1990s.

A New York congressman urged Major League Baseball to move the 2011 All-Star game from Phoenix. On Friday, the head of the baseball players union issued a statement harshly criticizing the law and saying the game's many Latino players and their families would run the risk of being harassed by police when in Arizona for games or spring training. A group of activists in Los Angeles said they would target Arizona companies and other institutions in the coming weeks. City officials in Los Angeles and San Francisco plan to research and reconsider their financial ties with Arizona.

The law's authors contended that, even with the original provisions, it would be used sparingly and only during stops or arrests. But critics say it's easy for police to invent a reason to stop someone they believe is an illegal immigrant. "It can be a cracked windshield. It can be a broken taillight. Any pretext to stop somebody and ask for their status," said Lydia Guzman, an activist here who tracks complaints of racial profiling by police who enforce immigration laws in Arizona.