Leading nations around the world are enacting strategies for artificial intelligence (AI) and, after much pressure, the United States is finally getting in on the action. President Donald Trump has vowed to maintain and strengthen America’s AI leadership with an Executive Order, dubbed the “American AI Initiative,” calling for prioritizing investments in AI research, enhanced data sharing, and training programs in science, engineering, and mathematics (STEM). “Continued American leadership in AI is of paramount importance to maintaining the economic and national security of the United States,” the order read.

But if President Trump truly wants to maintain America’s AI advantage, he must start supporting policies that capitalize on foreign students’ contributions. Right now, he’s just driving them out through overzealous crackdowns.

For years, these students have been the backbone of U.S. leadership in STEM fields, including in the research and development of AI. They pursue STEM degrees at unusually high rates and help universities maintain their academic programs’ size and quality. In fact, without international students, many universities wouldn’t have financially viable graduate programs in crucial fields related to AI. This includes programs such as computer science and statistics, where, in 2015, international students made up 79 percent and 69 percent of full-time enrollment, respectively. Even at the best schools, international enrollment far surpasses domestic interest. At Carnegie Mellon University, which has the nation’s highest ranked AI program, 78 percent of graduate computer science students were international.

American AI leadership hinges on its ability to recruit and keep students who bolster the nation’s STEM capabilities, but the Trump Administration’s immigration rhetoric and policies push those very people away. The Institute of International Education released a fall 2018 report which found that new international enrollment declined for the third year in a row after over a decade of steady growth.

While the United States makes these students unwelcome, Canada and Australia are courting them—to the benefit of their technology sectors. Canada’s Pan-Canadian Artificial Intelligence Strategy, which was announced in 2017, has been aggressively focused on bringing in top talent. And, when foreign students head north of the border, America loses highly skilled workers and investment.

Sadly, federal law enforcement also mistreats foreign students. Recently a sting operation by Immigration and Customs Enforcement (ICE) agents detained 129 Indian students after tricking them into enrolling in a fake school that granted work authorization but didn’t offer any classes. Because foreign students need to be enrolled full-time to maintain their visa conditions, ICE argued that those who enrolled were complicit in fraud. Really, it was ICE who defrauded the students by advertising a STEM curriculum that didn’t actually exist. And when students realized that classes weren’t actually being offered, ICE agents posing as school officials reassured them that courses would soon be available. In the end, these students were systematically misled by a federal agency antagonizing them for their interest in American education. Indian graduate enrollment is already declining—by 12 percent in 2018 and 15 percent the year before. Incidents like these will only make it harder for America to keep these students.

Chinese enrollment at U.S. universities has also slowed. This makes sense because last year the Trump Administration restricted the length of stay for Chinese graduate students studying robotics, aviation, and advanced manufacturing to one year. Four months later, the Financial Times reported that the White House considered outright banning Chinese students due to fears over espionage.

While the administration can justify concerns in areas with specific national security applications, the contributions of Chinese students more broadly is far too great to paint with a broad brush. Chinese students represent 30 percent of America’s international students, and over 70 percent of them specialize in STEM, going on to heavily contribute to American industry.

Furthermore, China is capitalizing on America’s insistence on shooting itself in the foot. Beijing’s ambitions in science and technology have benefited from their students return from foreign universities, and the government’s generous funding of non-Chinese academics—who are increasingly moving to China. Meanwhile, the White House is pushing away talented students by making it more burdensome to obtain the H-1B visa designed for skilled guest workers and its proposal to strip H-1B spouses of their employment authorization. It’s unlikely that China’s initiatives would be as successful if it weren’t for American policies.

If Trump doesn’t drop his punitive and paranoid approach toward foreign students and prioritize reforms that make it easier for them to stay in the country after graduation, the U.S. tech sphere could lose its edge. His administration should instead consider proposals to create a visa for AI workers. It should also push hard for the Fairness for High Skilled Immigrants Act—which eliminates the per-country caps forcing workers from heavily populated nations like India and China to wait twenty years or more before receiving their green cards. Making the permanent residency process fairer will motivate international students hailing from these countries to stay and contribute after graduation.

Should the Trump Administration continue to drive away foreign students, key fields essential to the advancement of artificial intelligence will struggle. Should students be mistreated while they study or be restricted from employment, they will utilize their talents in other countries. Only an approach that brings talent to the United States and keeps it here will deliver the results America desperately needs.