For the past four years, Daniel, an Israeli-born doctor completing a medical residency in the U.S., has secured an H-1B visa for temporary specialized workers without a hitch. But this May, without warning, the government put his status in the U.S. in danger.

Daniel, who withheld his last name for fear of retaliation, is one of many foreign-born medical residents across the country who have received visa rejections or delays since mid-April — similar to rejections thousands of H-1B applicants in other high-paying industries have recently received — prompting a flurry of legal activity from medical groups, hospital systems and individual doctors.

His situation is only the latest threat to international medical graduates. Several immigration policy changes under the Trump administration have left them deterred from or unable to practice medicine in the U.S. — which could be disastrous for a health care system already in the midst of a growing physician shortage. The changes could particularly affect patient care in community and underserved urban hospitals.

“I don’t want to sound paranoid, but I just think the current administration is trying to intimidate foreign workers and trying to intimidate hospital systems,” Daniel says. “For somebody who’s lived in the country for four years, that’s definitely not something I was expecting.” (A White House spokesperson referred TIME to United States Citizenship and Immigration Services (USCIS) and did not offer a separate comment.)

In Daniel’s case, after presenting USCIS with the same Association of American Medical Colleges resident stipend estimates that he’s used in his application for the last four years, USCIS responded with a request for evidence (RFE) seeking more specific, localized data — data that he says does not exist for resident physicians. Unless he can come up with it or mount a convincing enough legal argument before his visa expires on June 30 — the day before many medical residency programs begin across the country — Daniel will have to go back to Israel almost immediately, leaving his training unfinished and his hospital short a doctor.

The visa situation threatens the status of thousands of training physicians nationwide — roughly 25% of foreign medical residents in the U.S. rely on H-1B visas — and prompted a number of medical organizations to send a joint letter to the USCIS on May 30 expressing concern about the change. USCIS spokesman Michael Bars told TIME that any requests for evidence are in line with existing laws and standards.

“USCIS recognizes the use of valid private wage surveys by petitioners to establish the prevailing wage for an H-1B petition,” Bars said in a statement. “However, USCIS will continue to issue RFEs or denials, if appropriate, when officers determine that the petitioner has not established eligibility for the benefit sought. In keeping with the law as directed by the President’s Buy America, Hire America Executive Order as well as the intention of Congress, ensuring that H-1B employers are complying with all eligibility requirements serves to safeguard the integrity of the program to protect the wages, working conditions, and jobs of U.S. workers.”

In a second statement, Bars added that, “USCIS continues to review issues pertaining to private wage surveys and will consider issuing additional guidance to our officers in the future, if needed. If a petitioner has questions or concerns about its case, it may send an inquiry to USCIS through appropriate customer service channels.”

While the exact number of foreign doctors affected by policy changes isn’t known, signs of the trend have appeared in a few ways. Fewer non-U.S.-citizen international medical graduates registered for the residency match this year than in any since 2005, according to the 2018 Main Residency Match report. The number who became active applicants (7,067) was the lowest since 2012, the report adds. In 2016, for example, that number was closer to 7,500.

The downturn seems especially pronounced among residents of countries included in President Donald Trump’s original 2017 travel ban. (A revised travel ban looks likely to be upheld by the Supreme Court.) By recent estimates, about 8,000 doctors practicing in the U.S. were trained in countries included in the original ban.

Eighteen percent fewer doctors from countries included in Trump’s executive order came through the group that helps international medical graduates get certifications necessary to practice in the U.S., the Educational Commission for Foreign Medical Graduates (ECFMG), in 2017, according to the group’s president, Dr. William Pinsky. There’s also been an overall drop in the number of people applying for ECFMG certification over the past two years, he says.

“I’m hoping that the trend, or almost trend, that we’re seeing is because people are just waiting to see what’s going to happen,” Pinsky says. “But the fact is, there are opportunities for training around the world other than the United States.”

That’s something Sanaz Attaripour-Isfahani knows well. An international medical graduate trained in Iran and currently completing a fellowship in the U.S., Attaripour-Isfahani says she doesn’t regret the five-year logistical battle and multiple visa application denials it took to get here for residency. But she’s already seen that not everyone feels that way: Her sister, a doctor in Iran, decided to pursue residency in Canada, because the obstacles to getting into the U.S. are too great.

“I am very proud of what I gained here. [But] she does not think it’s worth it,” Attaripour-Isfahani says. “In the future, definitely, we will have a lot less Iranian doctors, comparing with what we had over the last 10 years.”

International medical graduates may increasingly gravitate toward programs in Europe, the U.K. and Canada if political trends continue, says Dr. Yusuke Tsugawa, a Japanese-trained doctor who has studied international medical graduates and is now an assistant professor of medicine at the University of California Los Angeles’ David Geffen School of Medicine. “In addition to the actual changes that have been made in the last one or two years, I think there’s some concerns about uncertainty around what’s going to happen in the future,” Tsugawa says. “They don’t want to come to the U.S. to start their training and get kicked out during the training, because that would be devastating for their careers.”

That uncertainty could have repercussions for patients, since foreign-born physicians occupy a pivotal place in the U.S. health care system. About an eighth of the resident workforce was born in a foreign country. With the American College of Physicians already projecting a shortage of between 40,800 and 105,000 doctors by 2030, any drop in the number of physicians who choose to practice in the U.S. could have significant effects.

Underserved areas may be the hardest hit. Studies have shown that international medical graduates are more likely to practice in inner cities and rural communities, and to enter essential practice areas such as primary care and family medicine — two fields U.S. grads are increasingly eschewing in favor of high-paying specialties like surgery and dermatology. Because of that trend, “Just training more doctors in the current system in the United States will overcompensate for specialists, and under-compensate for primary care docs,” says Dr. G. Richard Olds, president of St. George’s University in Grenada, a leading provider of foreign-trained U.S. doctors. International medical graduates “play a very important role, because we have had an insufficient number of U.S.-trained doctors for some time.”

There’s also evidence that international medical graduates provide care that is just as good, if not better, than that of domestically schooled doctors. A 2017 study by Tsugawa found that patients treated by international medical graduates had slightly lower 30-day mortality rates than people at the same hospital who were treated by U.S.-trained physicians. The two groups also had similar rates of hospital readmission, a metric often used to quantify quality of care. These results underscore the talent of international medical graduates, Tsugawa says.

“I don’t think the quality of the U.S. medical schools are worse than the quality of that in foreign countries,” Tsugawa says. “I think what explains it better is that the selection criteria for foreign medical graduates in the U.S. is pretty rigorous.” The residency match rate for Americans this year was 94%, meaning the vast majority of American students on track to graduate from U.S. medical schools were accepted to a training program. Only 56% of non-U.S.-citizen international medical graduates, by contrast, matched with a residency program this year.

Dr. Anupam Jena, a professor of health care policy at Harvard Medical School, agrees that the quality of international medical graduate care tends to be high. “We’re attracting the best and the brightest from all over the world,” he says. “Not surprisingly, the best and the brightest from India or China or Russia or wherever are probably going to be pretty good.”

Still, it can be difficult and costly to secure visas for foreign clinicians. That’s especially daunting for small, community-hospital-based residency programs — the type that tend to produce critically needed primary care physicians and doctors who end up practicing in underserved areas. “If you have a program with 15 first-year residents and one or two don’t show up, it could be devastating for the program,” ECFMG’s Pinsky says. As a result, small hospitals may simply not take the risk, leaving international medical graduates who don’t make the cut for the most selective programs in the lurch.

Some schools that did take the risk may be punished this year, given the current situation with H-1B visas. The letter sent to the USCIS by various medical groups notes that, for “at least one internal medicine training program,” 60% of incoming residents are on, or are supposed to be on, H-1B visas.

“I don’t even want to know what’s going to happen if [programs like that] have to start without having any of those people working,” Daniel, the medical resident, says. “That is really going to affect patient care.”

Get our Health Newsletter. Sign up to receive the latest health and science news, plus answers to wellness questions and expert tips. Please enter a valid email address. Sign Up Now Check the box if you do not wish to receive promotional offers via email from TIME. You can unsubscribe at any time. By signing up you are agreeing to our Terms of Use and Privacy Policy . This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply. Thank you! For your security, we've sent a confirmation email to the address you entered. Click the link to confirm your subscription and begin receiving our newsletters. If you don't get the confirmation within 10 minutes, please check your spam folder.

Write to Jamie Ducharme at jamie.ducharme@time.com.