Even as the number of new foreign students enrolling in U.S. post-secondary schools has fallen for the past two school years, the number of international students and graduates on a controversial work permit has hit record levels, according to a new report.

In the 2017-18 school year, the number of active “Optional Practical Training” permits — widely seen as an alternative to the hard-to-get H-1B visa — broke the 200,000 mark for the first time, the Institute of International Education reported Tuesday.

The OPT allows foreign students and graduates to work in the U.S. for 12 months, plus an additional two years if they’re in science, technology, engineering or math fields.

Meanwhile, the number of new foreign students enrolling in U.S. schools fell in 2017-18 to 271,738, after dropping the previous year from a high of around 300,000 in 2015-16, the data indicate.

Although OPT numbers are moving in the opposite direction, it appears that growth of that work permit has slowed. The 203,462 active OPT permits in the 2017-18 school year represented a 16 percent increase over the year before. But the previous two years before saw increases of 19 percent and 23 percent.

Pew Research reported in July that last year’s OPT growth was the slowest since 2004.

The administration of President Donald Trump has set its sights on the work permit. In January, U.S. Citizenship and Immigration published new rules requiring OPT holders to work directly for their employer, where authorities can conduct inspections — not for third-party clients of an employer.

The OPT program has grown larger than the program for H-1B visas, which are subject to an annual 85,000 cap on new visas, Pew reported in May. Since 2008, when a STEM extension was granted, the OPT has grown 400 percent, according to Pew.

“The H-1B is harder to get,” Pew researcher Neil Ruiz said in May.

The H-1B, heavily relied upon by Silicon Valley tech giants and criticized for reported abuses, has also become a target for the Trump Administration. Federal agencies have said they plan to strip work authorization from spouses of H-1B workers on track for a green card, and plan to change the H-1B lottery to favor more highly educated workers.

Industry group Compete America, which represents companies including Google, Facebook, Cisco, Hewlett-Packard Enterprise, Oracle, Salesforce, Amazon, Microsoft, IBM and Walmart, plus outsourcing and consulting firms Accenture and Deloitte, said earlier this month that its members were reporting a dramatic increase in the number of H-1B applications denied or delayed.

The International Education Institute produced the foreign-student data in collaboration with the U.S. Department of State, which on Tuesday stated its strong support for international-student enrollment in U.S. schools.

“International students studying alongside Americans are a tremendous asset to the United States,” Marie Royce, assistant Secretary of State for educational and cultural affairs. “We need to develop leaders in all fields who can take on our toughest challenges. We need people who can find solutions that keep us secure and make us more prosperous. We want to send a message that international education makes us stronger as a country.”

The top academic fields for foreign students in the U.S. in 2017-18 were engineering, business and management, and math and computer science, the institute reported.

John Miano, a lawyer for the Center for Immigration Studies, which pushes for reduced immigration, has been representing tech workers in a long-running lawsuit against the U.S. Department of Homeland Security over the OPT program. The suit claims Homeland Security, in authorizing the program, exceeded its authority, and that the program violates federal protections for American workers. Miano said Tuesday he expected Homeland Security will act to limit the OPT to one year.