MEXICO CITY -- Mexico is mounting an unprecedented effort to turn its permanent residents in the U.S. into citizens, a status that would enable them to vote -- presumably against Donald Trump.

Officially, Mexico says it respects U.S. sovereignty and has no strategy to influence the result of the presidential race. Yet Mexican diplomats are mobilizing for the first time to assist immigrants in gaining U.S. citizenship, hosting free workshops on naturalization.

"This is a historic moment where the Mexican consulate will open its doors to carry out these types of events in favor of the Mexican community," Adrian Sosa, a spokesman for the consulate in Chicago, said before an event on March 19. In Dallas, about 250 permanent residents attended the consulate's first "citizenship clinic" in February and another 150 in its second in March. In Las Vegas, the turnout topped 500.

Underscoring the fine line that separates participation from interfering in another country's election, Sosa noted that the consulate only hosts the event but it is community organizations that offer the advice.

Mexico may have the most at stake but it's not alone among U.S. allies bewildered by -- and worried about -- the reality-television star's success in the Republican primaries. Trump, who launched his campaign with invective directed at Mexico and a promise to build a border wall (with a "big beautiful door"), identified himself last week as his own top foreign-policy adviser.

"I'm speaking with myself, number one, because I have a very good brain and I've said a lot of things," Trump said on MSNBC when asked who he speaks with consistently on foreign policy. "My primary consultant is myself and I have a good instinct for this stuff."

With even senior U.S. Republicans, such as 2012 presidential candidate Mitt Romney, pledging to contest Trump's nomination to the end, views from other major capitals comprise both concern and calm. An official close to Japanese Prime Minister Shinzo Abe who asked not be named because he was not authorized to speak publicly said a Trump presidency would be a risk for the global economy and security. Trump has targeted Japan, along with Mexico and China, as nations where the U.S. is "getting absolutely crushed on trade."

The government in China still believes it's too early to focus on Trump given that he hasn't yet won the Republican nomination, according to a Foreign Ministry official who asked not to be named. The sentiment is shared in France, where President Francois Hollande's administration says that the U.S. election takes a backseat to addressing migrant crisis, the war in Syria and terrorism threats.

Joel Diaz doesn't want to wait to see how it all turns out. The Mexican-American, who has been a permanent resident of the U.S. for six years, arrived at the Mexican consulate in Chicago on Saturday with his wife and four adult sons to register all of them as U.S. citizens in order to vote against Trump.

"We're very worried," Diaz, 47, an evangelical pastor, said. "If he wins there will be a lot of damage against a lot of people here, and to us as Hispanics, as Mexicans."

Laura Espinosa, deputy consul in Mexico's consulate in Las Vegas, said the main goal of the program is citizenship, and while that includes the right to vote, the government doesn't press people to do so. "Those who use this to vote, that's up to each individual," said Espinosa, who confirmed that most consulates have begun citizenship campaigns. "We don't have any opinion on that, because that would be totally interfering in internal affairs of the country."

The government in Mexico City is holding off on engaging the Trump campaign directly until he becomes the nominee, said Francisco Guzman, chief of staff to Mexican President Enrique Pena Nieto. Speaking with reporters on March 1, Guzman said the government plans to communicate with the campaigns of the nominees once they're chosen and try to dispel what it considers misinformation about Mexico and Mexicans.

The public-relations offensive now under way includes using news outlets and social media to highlight the strides Mexicans have made in business, the arts and academia in the U.S., said Paulo Carreno, the former spokesman of Citigroup Inc.'s Mexico unit who oversees the country's international branding strategy.

Promoting Mexico in the U.S., from its scholars to artists, is meant "not to influence an election, but a whole generation and those that follow," Carreno said in an emailed response to questions. "The strategy will be an important anchor in our consular network in the country."

While Guzman said the administration understands the difference between campaign rhetoric and governing proposals, Pena Nieto this month in an interview with newspaper El Universal compared Trump's rhetoric to that of Adolf Hitler and Benito Mussolini.

The urgency and their numbers underscore why Mexican-Americans can have an impact.

About 12 million Mexicans live in the U.S. and almost half lack legal status, according to a November study by the Pew Research Center. About 2.7 million legal Mexican permanent residents of the U.S. are eligible to apply to become citizens, according to The New Americans Campaign, a nonpartisan group that helps people access naturalization services.

Ali Noorani, executive director of National Immigration Forum, a non-partisan Washington-based policy group that advocates on behalf of immigrants, said Trump's rhetoric and proposals have spurred interest in registering to vote among Mexican immigrant communities, particularly in Nevada, Colorado and Virginia.

Boosting turnout among immigrant voters could help tip the scale in the election, said Julian Zelizer, a professor of history and public affairs at Princeton University.

"Trump is exactly the kind of Republican who could mobilize legalized immigrant voters and others sympathetic to liberalized immigration policy," Zelizer said in an emailed response to questions. "This has been one issue where he has not been very vague and taking an extremely tough and aggressive stance. I suspect that if he was the nominee you could see very high turnout in certain states for Democrats as a result of this issue."