Julián Castro, a Mexican-American, is running for president. Latin music is more popular than country music, and one of the most recognizable political faces in the United States is Rep. Alexandria Ocasio-Cortez, D-N.Y., whose family comes from Puerto Rico.

And yet, Latinos — even those whose roots in this land stretch back to before the nation’s origins — still face overt and subtle racism and discrimination. Hate crimes against them are rising, and they are underrepresented in film, in high-tech jobs and in the federal government workforce. And when they advocate for equal treatment and representation — or even when they just speak Spanish in public — they hear over and over that they need to assimilate.

Two U.S.-born Latino women were detained by a Border Patrol agent last May for simply speaking Spanish in a convenience store; the American Civil Liberties Union recently sued U.S. Customs and Border Protection over that. The former White House chief of staff, John Kelly, said last year that Central Americans crossing the border are “not people who would easily assimilate.” NBC journalist Tom Brokaw recently said Hispanics “should work harder at assimilation,” and should make sure their children learn to speak English.

There is an ingrained perception among many white people that all Latinos are foreign no matter how long they’ve been in the United States or how “assimilated” they are, said Ian Haney López, an expert on racism and a law professor at the University of California, Berkeley.

"Many whites view us as 'foreign' when measured against white people, both in terms of physical and cultural differences, and then collapse that into the assumption that we're foreign in the national sense as well," said López, the author of “Racism on Trial: The Chicano Fight for Justice.”

The majority of Hispanics are U.S.-born and Latino immigration has been declining markedly in the last decade. Yet some Hispanics whose family roots in America date back centuries are still asked, especially if they have dark skin, where their family is from.

“How many times have people complimented to you on your ability to speak English, as if that’s an accomplishment because your skin is brown and you have a Latino surname?” López said.

More than 100 murals are painted in the Lincoln Park and El Segundo districts of El Paso to depict the city's cultural ties to Mexico. Paul Ratje / AFP-Getty Images file

A bounty of research debunks the idea that Latinos are not integrated into American society: Latino immigrants, like other immigrant groups, are completely English dominant by the third generation; their economic mobility rate is almost equal to that of whites; and Hispanics are more likely to marry outside their group than blacks or whites.

Disparities do remain, but those who tell Latinos to assimilate often fail to acknowledge the centuries of exclusion, racism and systemic discrimination that have slowed Latinos’ economic and social mobility. Racism puts up practical roadblocks to integration and participation, preventing Latinos from being accepted as “assimilated,” experts said.

Foreigners in their own land

The denial of basic rights to Latinos on U.S. soil — particularly those of Mexican descent — has a long history.

When the Mexican-American War ended in 1848, vast lands of Mexico became part of the United States. The Treaty of Guadalupe Hidalgo guaranteed full rights of U.S. citizenship for Mexicans who were living in that land before it was partitioned, including property rights.

But those protections were quickly ignored. The former Mexican citizens who became Americans, including many who were ranch owners, soon lost landholdings and status to new white settlers who regarded them as inferior.

Layered through this is a history of racial violence — including lynchings — against Hispanics.

In 1848, John C. Calhoun, a South Carolina senator and slave owner, protested the incorporation of the northern Mexico territories, saying that the United States was a government of the white race. Calhoun said treating Mexicans equally would be an error similar to those that had destroyed “social arrangements” in other countries, Ray Suarez, a former PBS correspondent, wrote in his book, "Latino-Americans: The 500-Year Legacy That Shaped a Nation."

The Morning Rundown Get a head start on the morning's top stories. This site is protected by recaptcha

Such thinking has continued in America over the past two centuries. It’s part of what Indiana University political science professor Bernard Fraga describes as a "push and pull" for Latinos who are told that to get more rights they have to assimilate.

“Assimilate is the excuse we use when opportunity is denied,” said Fraga, author of “The Turnout Gap: Race, Ethnicity and Political Inequality in a Diversifying America.”

The Mexican-American civil rights movement traces its origins to a moment when that excuse hit a breaking point: when World War II veterans returned from combat and were denied equal treatment. The Chicano soldiers’ contributions are still not fully recognized.

Obstacles to the American dream

The narrative that Latinos are choosing not to take their place in American society does not take into account the pushback they face when they try to do so. Today, for example, Latino voters are described as a sleeping giant with the potential to make a major political impact if only they went out and voted.

But this argument fails to include the attempts that can make it harder for Latinos to vote, whether through strict voter ID laws or recent attempts to question voters who are on the rolls. Gerrymandering, the drawing of electoral district lines to keep particular groups together, has packed growing Hispanic populations into fewer districts, diluting their voting strength. (In Texas, this has been called “packing and cracking,” concentrating Hispanics in a few Democratic districts and distributing the rest in safe Republican districts.)

Belief in the American Dream is strong among Latinos, a third of whom consider home ownership key to achieving it, according to Pew Research Center.

Yet a recent report found that in Iowa City, Iowa, Latinos were denied home loans four times more often than whites, the biggest disparity in the country. This adds to the wealth gap between whites and Latinos because most families’ net worth comes from their homes and their equity.

Exclusion may not be intentional or obvious, but it still has a discriminatory effect, said Joe Enriquez Henry, national adviser to the president of the League of United Latin American Citizens, the nation’s oldest Latino civil rights organization.

“Loan officers at banks can and do make the false assumption that Latino consumers are unable to qualify for mortgages or maintain loan payments,” said Enriquez Henry, who is also a real estate agent. “Many in our community may not utilize credit as much as the white community, but are clearly able to pay mortgages.”

While now illegal, redlining (the denial of mortgages in particular racial or ethnic communities) and discriminatory lending has had long-lasting effects, creating racially segregated Latino neighborhoods in cities such as Hartford, Connecticut, and restricting Hispanic mobility across the nation, according to research reported in The Washington Post.

Thomas Saenz, president of the Mexican American Legal Defense and Educational Fund (Maldef), a legal and civil rights organization, points to other ways in which Latinos have encountered discrimination.

Motel 6 agreed to pay up to $8.9 million last year to settle the lawsuit the fund filed against the motel chain for reporting guests to Immigration and Customs Enforcement based on their Spanish surname. Abercrombie and Fitch paid $50 million in 2004 to settle a lawsuit brought by Maldef and other groups for refusing to hire minorities. The retailer wanted its salespeople to look like their "all-American" models who were white, Saenz said.

English only, unless you aren’t Latino

When it comes to language, many Latinos see a double standard.

“It is a deficit when you speak Spanish, but it’s an asset to whites and white Americans when they speak it,” said scholar and educator Nicole Gonzalez Van Cleve, who documented racism in the criminal justice system in her book, “Crook County: Racism and Injustice in America’s Largest Criminal Court.” “This is the ultimate form of exclusion.”

Latinos feel that if they speak Spanish, they’re perceived as being unassimilated, new to the country or uneducated — stereotypes that do not apply to non-Latino whites who can speak other languages, including Spanish.

In education, there is a growing discussion over the disparity between the way school systems see programs for Spanish-speaking children — where the emphasis is on teaching English — and bilingual programs, which are increasingly popular for non-Latino, wealthier families who want their children to learn a new language.

The labels and codes ‘won’t go away’

Van Cleve, who is from Chicago and has family in the Mexican border town of Mission, Texas, grew up hearing relatives’ stories reflecting the difficulty Latinos face. “Even when you do everything right to ‘Americanize,’ there’s something about America to remind you, you are not one of them,” she said.

Her uncle, who has dark skin and was born in the U.S., told her he was stopped all the time by law enforcement and asked for his documents because “how he looked was more important than how he assimilated,” Van Cleve said. She said he would explain it to her by saying, “I just look illegal.”

President Donald Trump speaks at a rally in El Paso on Feb. 11, 2019. Trump continues his campaign for a border wall to be built along the U.S.-Mexico border. Joe Raedle / Getty Images file

One way to counter stereotypes is through the presence of more Latinos in the media, especially on news talk shows, a goal long advocated by many Hispanics and organizations. The absence is glaring, said Maldef’s Saenz, despite the fact that Hispanics in the judiciary, universities, corporations and in journalism can counter stereotypes and inaccuracies and “can inform the ignorance.”

This is especially important because many Americans live in states without substantial Latino populations, and a lack of Hispanics in the media leaves a vacuum that can be filled with “false negative images and rhetoric,” Saenz added.

Some Hispanics see progress in the way that the public focus on Ocasio-Cortez or on “Hamilton” creator Lin-Manuel Miranda is on their achievements — not their ethnicity.

Ultimately, though, the perception of Hispanics as outsiders is not going away anytime soon, Van Cleve said.

The newest Latinos to this country, and those coming here seeking refuge, for example, are regularly labeled as “illegal” or lumped with drug dealers or gang members, rather than being seen as vulnerable, she noted.

“We’re seeing a rise, almost a backlash, against the post-racial lie that we thought we were in, when we could not quote-unquote 'see color,'” Van Cleve said. “Race, darkness, skin type, all the things that label people, our bodies, our hair, an accent, culture, all the codes we’ve been trained in America to see, cannot and will not go away.”

FOLLOW NBC LATINO ON FACEBOOK, TWITTER AND INSTAGRAM.