The number of international students coming to the U.S. for high school is leveling off after years of rapid growth, according to a new study released Wednesday.

Researchers at the nonprofit Institute of International Education in Washington say growth is slowing as students face more education opportunities in their home countries and abroad. But the U.S. remains a top study destination for international students, researchers say.

"The numbers have been growing at slower rates each year, but there's still definitely interest and growth in international students coming to earn a high school diploma in the U.S.," said Christine Farrugia, author of the new study.

American high schools enrolled nearly 82,000 international students last year, the study found, more than triple the number from 2004. From 2012 to 2013 alone, the number increased 8 percent, but by last year the annual growth rate had fallen to just 1 percent.

Much of the shift has been driven by students from China, who accounted for 42 percent of all international students at American high schools last year. Although their numbers surged in 2013 and 2014, researchers found, the growth began to taper off in 2016.

It reflects a similar slowdown of Chinese students coming to U.S. colleges and universities, which some experts blame on China's cooled economy and increasing competition from schools in Australia and other nations.

High schools in the U.S. have also drawn large numbers of students from South Korea, Germany, Vietnam, Spain and Mexico.

Among students who come here for high school, more are staying to earn a diploma rather than for short-term exchange programs, the study found. Farrugia said the shift reflects a growing number of students coming to gain an edge when applying to U.S. colleges.

"They're coming to get that experience, to get that admissions advantage," she said. "They're getting immersed in U.S. culture."

California has been the top destination for international high school students, with 12,200 last year, followed by New York, Texas, Florida and Massachusetts.

Foreign students make up only half a percent of the more than 15 million high school students in the U.S., and they're required to cover their own costs. The vast majority of them attend private schools, and more than half attend schools with a religious affiliation.

While growth among international students has slowed, the number of schools hosting them has continued to surge. The study found that 2,800 high schools enrolled international students last year, an increase of 26 percent since 2013.

At the same time, U.S. colleges are increasingly building ties with those schools as part of their work to recruit international students to campus, said Rajika Bhandari, head of research at the Institute of International Education.

"There's a realization that recruiting future international students to colleges and universities in the U.S. is not just going to be about going overseas," Bhandari said. "A lot of them are actually right here in our backyard."