PHOENIX — Arizona is well accustomed to the derision of its countrymen.

The state resisted adopting Martin Luther King’s birthday as a holiday years after most other states embraced it. The sheriff in its largest county forces inmates to wear pink underwear, apparently to assault their masculinity. Residents may take guns almost anywhere, but they may not cut down a cactus. The rest of the nation may scoff or grumble, but Arizona, one of the last truly independent Western outposts, carries on.

Now, after passing the nation’s toughest immigration law, one that gives the police broad power to stop people on suspicion of being here illegally, the state finds itself in perhaps the harshest spotlight in a decade.

The law drew not only the threat of a challenge by the Justice Department and a rebuke from the president, but the snickers of late-night comedians. City councils elsewhere have called for a boycott of the resort-driven state; one trade group of immigration lawyers has canceled a conference planned for Scottsdale at a time when the state is broke and desperate for business. Meanwhile, a continuous protest is taking place at the State Capitol.