One of Mexico’s best-known TV hosts sat in a car, masked, looking straight ahead while a needle was plunged into his bare upper arm. Juan Jose “Pepillo” Origel was the latest Mexican national to get a dose of coronavirus vaccine — by coming to the United States.

“Vaccinated! Thank you #USA how sad that my country didn’t provide me with this security!!!” the 72-year-old star tweeted in Spanish on Jan. 23, along with a photo of his inoculation in the parking lot of the Miami zoo.

Mexican social media users immediately criticized Origel, protesting that his ability to fly to the United States to be vaccinated, crystallized their nation’s vast inequities. About the same time, Florida health leaders, concerned that out-of-state residents and foreign nationals were flocking in for precious doses of scarce coronavirus vaccine, moved to restrict access to full- or part-time residents of the state.

But Origel and possibly thousands of other foreign nationals who have been vaccinated in the United States did not violate federal policy. The Centers for Disease Control and Prevention has yet to tackle the issue of foreign nationals getting vaccinated. The agency did not address the issue of Americans crossing state lines for shots until Monday, when it told states they could restrict coronavirus vaccinations to their residents.

States have been authorized to devise their own vaccination eligibility requirements based on guidance from a CDC advisory group, and each state has different rules.

California’s vaccination website explicitly states that residency is not a requirement for receiving a dose. Arizona acknowledges that it is probably vaccinating some border crossersalong with the snowbirds it considers eligible.

“If they are in Arizona, they are here and in the same situation as someone whose license says another state,” said C.J. Karamargin, press secretary for Gov. Doug Ducey (R). “We’re still keeping Arizonans safe. We’re keeping everybody safe.”

Texas Gov. Greg Abbott (R) has said the state’s vaccine supply is for Texans only. A spokeswoman did not answer a query about how that is enforced. But along the border, where places like Laredo and Nuevo Laredo, Mexico, form one large metropolis, health officials say a small number of foreigners are almost certainly slipping through.

“There may be a few people who make it through the screening process, but you know what? We are a binational community,” said Maurice Click, a physician who provides vaccination and other services to patients on behalf of Laredo’s Health Department. “It’s Nuevo Laredo and Laredo. There are families on both sides. We share a culture. We share a language. We share an economy. If one side has a problem, the other side has a problem.”

Behind the debate is the polarizing issue of immigration policy, now complicated by difficult health policy decisions during a pandemic emergency. The Biden administration and public health experts say anything that discourages the estimated 11 million undocumented immigrants in the United States from seeking vaccination — such as tightly enforced demands for proof of residency or legal status — would be self-defeating as the nation tries to reach herd immunity.

“It is a moral and public health imperative to ensure that all individuals residing in the United States have access to the vaccine,” the Department of Homeland Security said in a statement this month. “DHS encourages all individuals, regardless of immigration status, to receive the COVID-19 vaccine once eligible under local distribution guidelines.”

That led Rep. Steve Scalise (La.), the second-highest-ranking Republican in the House, to complain in a Fox News interview that undocumented immigrants can “jump ahead of other Americans who have been waiting to get the vaccine.”

In fact, U.S. Latinos are being immunized in much smaller proportions than Whites, federal data shows. Unfounded rumors about the vaccine and fear of authorities are partly responsible in some communities. But inequity in supply and access plays a role.

In Laredo, for example, physician Ricardo Cigarroa, who heads the covid-19 unit at Laredo Medical Center, said his community, which is more than 90 percent Latino, has received fewer than half the vaccine doses as comparably sized Lubbock. In Dallas, Sharon Davis, chief medical officer for Los Barrios Unidos Community Clinic, said she has received just 300 doses for 26,000 mostly undocumented patients.

In Mexico, supply is even shorter than it is in the United States. So Origel, and presumably others, did what they could to seek it out. Origel said a friend sent him an online form to fill out for vaccination in Florida. After he submitted it, authorities called him with an appointment.

“I arrived at the zoo at the hour they assigned me, with the paper I had filled out, my Mexican passport. . . . I went, showed my passport, they saw I had an appointment, they gave me the vaccine,” he said in a telephone interview.

The blowback from his celebratory tweet was immediate. One tweet called him “a vile, miserable person who insults the majority of Mexicans who don’t have the resources to go get vaccinated in the U.S.”

Origel defended his trip and said those who criticized him were jealous.

“I feel like people are very sensitive, very pained, because we all want to be vaccinated. Maybe my error was posting the photo in which they were giving me the vaccine,” he said. “I didn’t do it for any bad reason. I was saying thank you to the U.S. because they gave me the vaccine.

“I’ve known lots of Mexicans, thousands, who have gone to get the vaccine in the U.S.,” he added. “And nothing happened. In San Antonio, Laredo, all along the Mexican border, Mexicans are going to get the vaccine.”

There have been reports of Canadians, Argentines and others coming to Florida to get vaccinated. An Argentine television personality last month posted a video of her mother getting vaccinated in Miami on social media.

There are no official estimates of the number of Mexicans or other Latin American citizens traveling to the United States for vaccination, but there are numerous obstacles in their way. The U.S. government has limited travel over the Mexican border to essential activities. That means nonresidents aren’t allowed to cross for shopping or tourism.

But many Mexicans of means are accustomed to a binational life, with second homes or businesses in cities such as Houston, San Antonio and San Diego. Others cross the border every day to work in lower-paying jobs. Hundreds of thousands of U.S. citizens live in Mexico, and some of them are flying or driving north to get vaccinated.

Some Mexican officials are openly recommending that their citizens seek vaccination in the United States. The media are filled with what is being called “vaccine tourism.”

“My recommendation is, go ahead, do it,” the health secretary of northern Nuevo León state, Manuel de la O, told a news conference in late January. “It’s an act of survival.”

“There are all types of cases,” added Miguel Treviño, the mayor of San Pedro Garza García, a borough of the northern city of Monterrey and one of the wealthiest jurisdictions in the country. “Some have property and a close relative there, or there are people who simply took a plane, got an appointment and did the vaccine.”

In some cases, that meant getting on lists of people who would be vaccinated with unused doses at the end of the day, he said.

“It’s an important number of people going,” he said. “Undoubtedly, we are talking about thousands.”

In recent weeks, patients jammed hospitals in Mexico City and Monterrey, pushing them to the brink of collapse, as a brutal second wave of infections coursed through the country. The Mexican government has tallied more than 172,000 covid-19 deaths — the third-largest total in the world, and 18th-most per capita, according to Johns Hopkins University.

Mexican authorities have aggressively pursued the vaccine and had received hundreds of thousands of doses of the Pfizer-BioNTech product.

But supplies have largely dried up in recent weeks, due to a decision by Pfizer to close one of its main production facilities to upgrade equipment. Mexico has so far limited its vaccine distribution to front-line medical workers and teachers in the southern state of Campeche.

“Here, at the pace the government is going, it’s going to take 35 years before everyone is vaccinated,” said Alberto Lara Bazaldúa, a union leader and opposition-party lawmaker in the border state of Tamaulipas.

But he is opposed to affluent Mexicans flying to the United States to get vaccinated.

“It’s not correct they do this. It’s not ethical,” he said.

The mayor of the border city of Reynosa, Maki Esther Ortiz, said some residents are driving into Texas to be vaccinated, but the flow is minimal.

“I think it’s not even 1,000,” she said, noting the coronavirus restrictions. “Those who pass have the advantage of dual nationality,” she said.

De la O, the health secretary of Nuevo León state, said in a telephone interview that many traveling from his state to the United States to be vaccinated are well-to-do: “There are people of a very high economic level. Many people have private jets. Others are renting planes to go get the vaccine.”

Leighton Ku, a professor of health policy at George Washington University, said the question of residency is often tricky for authorities to ask. It is difficult to establish with certainty and raises legal questions in the provision of any kind of benefits.

When compared with the public health benefit of inoculating the whole population, and the much larger problems of supply and distribution, the issue of foreign nationals is minor, he said.

“While I’m willing to believe there is a possibility that some immigrants from Mexico could get the vaccine,” Ku said, “seriously, the risk is low when all is said and done.”

Correction: A photo caption previously misstated the location of Hard Rock Stadium. It is in Miami Gardens, Fla., not Miami.