With a stroke of a pen, Alfonso Navarro-Bernachi’s worst nightmare became a reality.

The pen belongs to Arizona Gov. Jan Brewer, who on Friday afternoon signed into law the most far-reaching anti-migrant law in the country—a measure so controversial it jump-started the national debate over immigration reform virtually overnight. President Obama bashed the bill as irresponsible in an address from the Rose Garden even before Brewer had signed it, saying it would “threaten basic notions of fairness that we cherish as Americans,” and called for federal action.

And the nightmare? That suddenly, some 460,000 undocumented immigrants, most of whom are Mexican, will be subject to arrest in the shadow of the Arizona Capitol for “trespassing”—just by walking down the street. The new law makes it a crime for U.S. citizens to live with, drive, or otherwise “harbor” people they know to be “illegal aliens" (like their parents or siblings), requires local cops to enforce immigration laws, and permits Arizonans to sue public officials who aren’t rounding up “illegals” to their satisfaction.

For weeks, Navarro-Bernachi, as Mexico’s man on the front lines in Phoenix, has been urgently trying to educate Mexican nationals in the area what to do once the bill becomes law. As deputy Mexican consul in Arizona’s capital city, he’s held public forums in schools and churches, reminding Mexican nationals of their right to remain silent and not to sign documents should they be arrested—and directing them to request the assistance of his office, which will in turn put them in touch with legal counsel. He also started public-service announcements about civil rights on Spanish-language media. In the days before the bill was signed, Navarro-Bernachi ramped up his appeals to Mexican nationals to contact his office immediately should any “abuse” occur in Arizona.

• Big Fat Story: Has Arizona Lost Its Mind?It’s a little like moving sandbags in advance of Hurricane Katrina. “Local politicians disregard the Mexican community,” Navarro-Bernachi told The Daily Beast. And he says he was actively discouraged by Democrats in the Arizona legislature from playing the emotional card. “It wouldn’t be in the best interest to play the victim role,” he says he was told. Navarro-Bernachi takes great care in what he says, as a former journalist working hard to honor the button-down dictates of a diplomat’s role. But he allows that this bill is “more aggressive and dangerous” than other legislative initiatives he’s dealt with in the past.

All around him, the anger and anxiety is rising. The “trespassing” debate has transformed the normally sleepy state capitol grounds into a hotbed of protest. Hundreds of students and immigrant advocates, summoned via Facebook and Twitter, have poured into town to join thousands of Arizona high school and college students to demonstrate against the measure. The young activists have kept a 24-hour vigil, marching, beating drums, and filling the air with chants of Hey, hey! Ho, ho! Racial profiling’s got to go! Nine students chained themselves to the doors of a Capitol building and were arrested and jailed for disrupting the peace, only to be bailed out by volunteer lawyers.

Yet they are a distinct minority in-state; according to the latest Rasmussen poll, some 70 percent of Arizonans favor the bill. “Illegal is not a race, it’s a crime,” said state Sen. Russell Pearce, who pushed the bill through the Arizona legislature in an election year, brushing off criticisms that the law will institutionalize racial profiling. Pearce vowed the measure will result in less-crowded schools and shorter hospital emergency-room waits. Sen. John McCain, in the midst of a tough primary challenge from the right, has jettisoned his past position on immigration reform and embraced the bill. The political sparkplug for the bill’s passage was the mysterious March 27 murder of Robert Krentz, an Arizona borderlands rancher. The identity of his killer has not been established, but many in Arizona instantly assumed it must have been an illegal immigrant.

As the storms rage, Navarro-Bernachi has been carefully monitoring the situation. On the day the Arizona Senate passed the bill, he sat in an empty conference room flanked by Mexican flags, keeping tabs on the vote in a neatly pressed gray business suit and spit-polished black shoes. Just down the hall, in a large crowded room, grim-faced Mexicans renewed passports or Mexican ID cards, which could help them get assistance from the consul general’s office should they get arrested for being in the country illegally. Others registered their American kids with the Mexican government, so that families that included both Mexican and American citizens could return to Mexico if one family member got deported for trespassing.

For months, Navarro-Bernachi has been regularly updating the Mexican government on the progress of the trespassing bill, and huddling with what he calls “strategic allies”—faith, business, and activist groups that opposed the measure.

Navarro-Bernachi's job bars him from actively protesting or commenting on Arizona laws. As Brewer prepared to sign the bill into law, he and his staffers huddled in the consulate, fielding phone calls but politely refusing substantive comment. He’s stepped aside while Mexican elected officials and media blasted the measure as a state-sanctioned form of racial profiling that promised to sour diplomatic and business ties between Mexico and Arizona. The financial stakes, too, are high: In 2008 alone, Mexican tourists contributed about $3.61 billion to the state's $18 billion tourism industry and created more than 23,000 jobs, according to a University of Arizona study.

Arturo Sarukhán, the Mexican ambassador to the United States, called the measure a “deplorable” election-year tactic; El Universal, a leading newspaper, wrote that the law put unauthorized migrants in Arizona in the same category as murderers, rapists, and terrorists. Another Mexican newspaper, El Imparcial Sonora, polled readers to see if Arizona’s new law would stop drug trafficking into the United States; readers overwhelmingly voted “no.”

El Universal reported that Guillermo Padrés Elías, the governor of Sonora (Arizona’s neighbor to the south) phoned Brewer Thursday to voice his displeasure with the bill. Padrés told El Universal that Brewer just didn’t think the law had the same consequences that “many of us think it has.”

The political climate on immigration has tacked steadily to the right since Navarro-Bernachi was first assigned to his post in Phoenix in 2006. Unauthorized immigrants toil in Arizona's hospitality, construction, and agricultural industries, but are subject to arrest if caught working or driving.They can be slapped with felonies if they present false IDs to get jobs, or if they hire a "coyote" to smuggle them through Arizona. They are barred from publicly funded benefits, too, including food stamps, health care, and in-state college tuition. These measures, already in place before Brewer signed the “trespassing” bill, have filled Phoenix-area correctional facilities with undocumented immigrants serving felony sentences for violating state immigration statutes.

Though it hasn’t been easy, Navarro-Bernachi has forged a civil working relationship with Maricopa County Sheriff Joe Arpaio, who’s gained international fame by rounding up Mexicans in front of TV cameras and who outraged the Mexican government in early 2009 when he invited the press to view his officers parading 220 chained undocumented Mexican inmates en route from one jail facility to another. The sight of their manacled and humiliated countrymen infuriated Mexicans, and Navarro-Bernachi’s predecessor, Carlos Flores Vizcarra, warned the Maricopa County Board of Supervisors that the sheriff’s actions “create a culture of cruelty and humiliation that is not becoming to Arizonans.”

Navarro-Bernachi’s relationship with Arpaio may come in handy in the weeks ahead. The sheriff’s office could help consular officials get easier access to county jails, like the famed Tent City, where Mexican nationals are confined for violating state immigration laws. And Navarro-Bernachi has tried to maintain good relations with local Immigration and Customs Enforcement officials, who process Mexicans caught up in immigration raids.

In signing the legislation into law, Gov. Brewer said she’d considered the implications “long into the night” and offered assurances that civil rights would not be damaged. “I will not tolerate racial profiling in Arizona,” she said. The Mexican consul general will be watching. As it happens, Navarro-Bernachi will be gone from his post by the time the law takes effect, 90 days from now. He steps down this summer, when a new consul general appointed by the Mexican government arrives in Phoenix. Perhaps then he can do what he only dreams of now—a dream held in check by the diplomatic demands of his job. On occasion, he admits he’s secretly wished that he could attend one of those protests sponsored by activists, instead of watching them on television in the air-cooled office of the Mexican consul-general. After all, he told me, “I do have blood in my veins.”