PHOENIX — Thousands of people from around the country marched to the Arizona state Capitol on Saturday to protest the state’s tough new crackdown on illegal immigration.

Marchers carrying signs, banners and flags from the United States and Mexico filled a five-mile stretch of central Phoenix.

Police declined to estimate the size of the crowd, but it appeared at least 10,000 to 20,000 protesters braved temperatures that were forecast to reach 95 degrees by mid-afternoon. Organizers had said they expected the demonstration to bring as many as 50,000 people.

Opponents of the law suspended their boycott against Arizona and bused in protesters from around the country. Volunteers handed out water bottles from the beds of pickup trucks, and organizers set up three water stations along the route.

About 20 people were treated for heat or fatigue-related symptoms, and seven of them were taken to a hospital, said Phoenix police spokesman Sgt. Tommy Thompson. There were no arrests or other incidents, he said.

The law’s opponents also gathered at capitols in states including Texas and Oregon, and about 300 people protested at the U.S. Embassy in Mexico City demanding legalization for undocumented Mexican workers in the United States.

“Many of us have relatives or friends in the U.S., and we must now stand up and speak out on their behalf,” said Elvira Arellano, who gained international attention in 2007 when she was deported without her son, a U.S. citizen.

In San Francisco, about 500 people gathered Saturday night outside AT&T Park, where the Giants were playing the Arizona Diamondbacks. Rally leaders said it was organized to push for a boycott against Arizona.

Backers of Arizona’s law expect to draw thousands to a rally of their own Saturday evening at a baseball stadium in suburban Tempe, encouraging like-minded Americans to “buycott” Arizona by planning vacations there.

Critics of the law, set to take effect July 29, say it unfairly targets Hispanics and could lead to racial profiling. Its supporters say Arizona is trying to enforce immigration laws because the U.S. government hasn’t done so.

The law requires that police conducting traffic stops or questioning people about possible legal violations ask them about their immigration status if there is “reasonable suspicion” that they’re in the country illegally.

Supporters of the law insist racial profiling will not be tolerated, but civil rights leaders worry that officers will still rely on assumptions that illegal immigrants are Hispanic.

College professor Luis Jimenez of South Hadley, Mass., said the law will force police to spend much of their time on immigration violations instead of patrolling neighborhoods or dealing with violent crime.

The law also makes it a state crime to be in the U.S. illegally or to impede traffic while hiring day laborers, regardless of the worker’s immigration status.

“You’re saying to the cop: ‘Go pick up that day laborer. Don’t worry about that guy committing crimes,’” said Jimenez, 33, a naturalized citizen from Mexico who grew up in Phoenix.

Alfonso Martinez, 38, a Phoenix carpenter and father of three children who are U.S. citizens, said he’s been living illegally in the United States for 21 years while trying to get legal status.

“If they stop me and they find my status, who’s going to feed my kids? Who’s going to keep working hard for them?” he said, keeping a careful eye on his 6-year-old daughter as his wife pushed their 4-year-old girl in a stroller. Their 13-year-old son walked ahead of them.

Supporters of the law sought to counteract the economic damage of boycotts by bringing supporters into the state.

“Arizona, we feel, is America’s Alamo in the fight against illegal and dangerous entry into the United States,” said Gina Loudon of St. Louis, who is organizing the “buycott.”

“Our border guards and all of Arizona law enforcement are the undermanned, under-gunned, taxed-to-the-limit front-line defenders trying to hold back the invasion,” she said.