– Ana Maria Gallegos’ family has called this part of the West home for centuries. But after growing horrified by the resurgent racism she has seen across the United States, she reviewed her options and decided on a plan: emigrate to Spain.

Gallegos joined a growing number of Hispanics from the United States benefiting from a 2015 Spanish law seeking to atone for one of the grimmest chapters in Spain’s history: the expulsion of thousands of Sephardic Jews in 1492. The law offers citizenship to descendants of those Jews, many of whom converted to Catholicism but secretly adhered to Jewish traditions as they settled in New Mexico and other frontiers of the Spanish Empire.

“I had neighbors start spewing the same racist talk as the president of the United States,” said Gallegos, 54, a court reporter raised in a Catholic family. “All this hatred just scared the wits out of me, but fortunately I had this ancestral connection.” She moved to Málaga this year with her husband and 12-year-old daughter.

Americans pursuing Spanish citizenship often cite a mixture of reasons, including the chance to experience the cultures of Spain, access to public health care, or the lower cost of higher education at European universities. But many also express alarm over a recent surge in hate crimes and harassment targeting Hispanics and President Donald Trump’s demonization of Latin American immigrants.

Their efforts to obtain Spanish citizenship reflect a troubling new twist in the Hispanic experience in the U.S.: Some whose families have been here for centuries now feel so vulnerable about their place in society that they are finding refuge in the country that expelled their ancestors five centuries ago.

Such fears seem to be growing more acute. Sixty-seven percent of Hispanics in the U.S. say the Trump administration’s polices have been harmful to Hispanics, compared with 15 percent during the Obama administration, said a poll released in October by the Pew Research Center.

“Our applications jump every time Trump says something scary,” said Sara Koplik, director of community outreach at the Jewish Federation of New Mexico, an organization vetting applicants for the Spanish government. “Some want Spanish citizenship as a kind of insurance policy in case things go very wrong in this country.”

The Spanish law does not require applicants to give up their existing citizenship, and they do not have to be practicing Jews, but they must have their Sephardic ancestry confirmed by established Jewish organizations and pass language and civics exams. Estimates vary on how many Americans might be eligible, since many Hispanics are unaware of their own Sephardic heritage. But scholars say that people with such ancestry number in the hundreds of thousands in the United States, if not more.

Albuquerque has emerged as a flash point for people who are pursuing applications, thanks in part to the expertise of historians such as Koplik in certifying Sephardic heritage, and the openness of the state’s Jewish Federation to examining applications from people who are not practicing Jews. Hundreds of applicants have traveled here to take language and civics exams at the Cervantes Institute, an organization funded by Spain to promote the teaching of the Spanish language and culture.

Koplik said that applicants have come from around the Americas but are largely divided into three groups: Venezuelans trying to flee their country’s economic crisis; Mexicans from the relatively prosperous state of Nuevo León, where there is a large concentration of people with documented Sephardic ancestry; and multigenerational Hispanic families with roots in what is now the American Southwest.

The Spanish law allows applicants to pursue citizenship by proving that they have at least one Sephardic ancestor who fled Spain some 500 years ago. New Mexico, with its wealth of colonial-era archives and U.S. census data after the American conquest in 1848, stands out for its relative ease of delving into records compared with other places where so-called crypto-Jews settled.

“We know that various people who came to New Mexico in the earliest phases of Spanish colonization had Sephardic backgrounds,” said Dennis Maez, 60, a genealogist in Albuquerque. “From there, it’s a matter of connecting the dots through the centuries.”

Altogether, more than 6,400 people worldwide have obtained Spanish citizenship under the law since 2015. Authorities extended the deadline for applying under the measure by a year, until October 2019.