Alan Chen worries every day about what he will do after his college graduation in May.

A Chinese immigrant living in Boston, Chen says his future depends on a federal immigration programcalled “optional practical training” that allows recent graduates or current students from other countries to gain experience in their field for up to a year.

But recent efforts to kill the program in the U.S. Congress, the White House and the courts have left Chen and many other foreign students wondering if they will have to change plans and quickly move back to their native countries.

“I’m confused and don’t know what to do next,” said Chen, 22, who studies at the Berklee College of Music. “It’s quite scary.”

Hundreds of thousands of international students depend on the program to stay in the United States during or after college to work. Students can receive up to a year of work in their major-related fields. Those who major in science, technology, or engineering may qualify to stay and work for up to two more years.

In 2017, a record 276,500 international students received authorizations to temporarily work under the program, which is the nation’s largest source of temporary high-skilled foreign workers, according to a2018 study from the Pew Research Center. The number grew by 8 percent, the report says, compared with 34 percent in 2016.

Students with expertise in an array of fields are now concerned about their future. Ivy Wen, 21, a film production student at the School of Visual Arts, New York, says she’s starting to think of other options if the program is canceled. She’s concerned she’ll miss out on needed training.

“I need to practice to be a good filmmaker,” Wen said. “I need a backup plan now because I don’t know if I’m able to legally get a job.”

The one-year work program was first introduced in 1992. President George W. Bush in 2008 extended the work period for science and math majors to 18 months. In 2016, President Barack Obama again extended the program for those students for up to three years.

Many international students like the program because it is easier to apply to and carries less government oversight than a more traditional temporary work visa. Eligible students apply through their school and usually receive employment authorization within four months.

“I thought it is an automatic thing. You graduate, you get one year to stay here and get the skills,” Wen said. “Obviously things are changing.”

Concerns are growing as the U.S. District Court for the District of Columbia considers a legal motion filed by a private group to cancel the federal program. The Washington Alliance of Technology Workers first filed a motion in 2014 challenging the federal government’s legal authority to grant work authorization to international students. Known as WashTech, the group claims that the federal government doesn’t have the authority to grant work authorization to foreign students.

“It’s a question of whether or not the government has the authority to authorize employment for students because it’s not specifically mandated,” said Sharvari Dalal-Dheini, director of government relations for the American Immigration Lawyers Association.

WashTech officials could not be reached for comment. The D.C. Court dismissed the case in 2017, saying it was filed too late, but the decision was reversed a year later by an appeals court.

Now the case is back at district court, which must reconsider the motion. A status conference is scheduled for March.

The court case isn’t the only threat to the work program. In June, U.S. Rep. Paul Gosar, a Republican from Arizona, introduced a bill titled “Fairness for High-Skilled Americans Act of 2019” to cancel the program, arguing it takes jobs from U.S. citizens.

Gosar also wrote a letter in June to President Donald J. Trump asking him to kill the program by executive order.

“Powerful interests will tell you that OPT is good for America and needed for U.S. competitiveness,” the congressman wrote. “But millions of taxpaying, hardworking people from across the country disagree.”

The Trump administration has long been targeting the program among other efforts to police international students. Earlier this fall, the U.S. Immigration and Customs Enforcement announced plans to change the program. In arule proposal with a target date of August 2020, the agency says it will “amend existing regulations and revise the practical training options available to nonimmigrant students.”

At the same time, universities across the U.S. support the federal training program, saying it provides benefits to students and a competitive edge to institutions drawing young people from around the world. In November, a group of 118 public and private colleges and universities — including many from Massachusetts — filed anamicus brief to the district court supporting the program.

“Experiential learning is now, and has long been, a crucial component of education in this country,” said Miriam Feldblum, executive director of the Presidents’ Alliance of Higher Education and Immigration, an association of university presidents and chancellors.

Feldblum said the training program has been a key component of the country’s educational system. “Any rollback of [the program] will severely harm international students, the future of American higher education, and economic growth,” she said.

The uncertainty about the program comes as the number of international students in the U.S. is dropping. Enrollment numbers have been declining since 2016, according to aMay report titled “Losing Talent” by the nonprofit advocacy organization NAFSA: Association of International Educators.

“University and industry leaders acknowledge that anti-immigrant rhetoric and policies contribute to a chilling effect on international study in the United States,” the report says.

Many major businesses also support the program, claiming companies need trained workers, especially in the science and math fields. More than 60 businesses and organizations, including Microsoft, Apple and Facebook, signed a legal motion in support of the program that was recently filed with the court.

“Graduates of American colleges and universities should be able to stay in the United States to develop and contribute their skills here, rather than taking them elsewhere to compete against us,” said Todd Schulte, president of the lobbying group, which signed the legal brief. “But our broken and outdated immigration system makes it incredibly difficult for them to stay in the U.S. after graduation.”

In the meantime, immigration advocates are advising students to continue to apply for practical training and keep an eye on possible policy changes.

Chen says he searches every day for news online about the program that he believes is key to his future.

He’s among many at Berklee School of Music feeling the same stress — the college’s Boston campus has some 1,600 international students making up about 35 percent of its total student population.

“I have several employers in mind to apply for an internship, but now I’m afraid that it won’t happen,” Chen said.

David Zheng Zong is a journalism student at Boston University College of Communication.