International students attending American high schools or universities will have to leave the country or risk deportation if their classes shift entirely online in the fall in response to the coronavirus pandemic, the U.S. government said Monday.

The government said it will stop issuing visas for students who pursue online-only courses from September, while those who are already in the United States will need to transfer to institutions offering in-person classes or leave the country.

Students make their way between classes on the University of Southern California Los Angeles campus on March 9, 2020. (Los Angeles Times/Getty/Kyodo)

The move comes as President Donald Trump's administration has tightened visa regulations, extending a pause in the issuance of "green cards," or permanent resident cards, amid the pandemic. In June, it suspended the issuance of some work visas.

The decision applies to the F-1 and M-1 visas, which are used by academic and vocational students, respectively.

Students attending institutions that combine online and in-person classes will need to prove that their enrolled programs are not entirely taught via the internet.

In the United States, 388,839 F visas and 9,518 M visas were issued in the fiscal year ended in September 2019, according to U.S. government preliminary data.

The number of confirmed COVID-19 cases in the United States has topped 2.93 million with over 130,000 deaths, the highest in the world, according to a tally by Johns Hopkins University.