A Fairfax County teenager finished fifth in the world and was the top U.S. finisher in an international biology competition for high school students earlier this month in Bali, Indonesia.

William Long, a rising senior at the Thomas Jefferson High School for Science and Technology, bested 233 other competitors at the 25th annual International Biology Olympiad, which ran from July 5 to July 13.

Long, 17, said he became interested in biology as a freshman at TJ, as the Fairfax County, Va., magnet school is known.

“I immediately loved it,” said Long, who also plays on the varsity soccer team.

Last year, Long was among 10,000 U.S. contestants who took part in a preliminary round of the national biology olympiad competition. He finished in the top 20 and was invited to attend nationals. There, he completed intense testing that included dissecting cockroaches, determining the starch content of plant extracts, and comparing the anatomy of a starfish and a sea urchin.

Long placed first in the contest and joined three other U.S. students in qualifying for the international competition in Bali. There, he faced students from 60 countries.

After overcoming jet lag — Bali is 12 hours ahead of the U.S. east coast time zone — Long was tasked with a series of complicated biology tests. At one point, Long had to determine the species of six different prawns drawn from the waters off Indonesia. (Long said he did not often have the opportunity to study local prawn physiology in Fairfax County.)

Long ended the competition in fifth place behind students from South Korea, Singapore and Taiwan. The other U.S. students finished 9th, 19th and 30th.

Long, who is currently an intern at the National Institutes of Health, said he wants to pursue a career in biomedical engineering or computer science.

He said that participating in biology competitions has helped him gain a keener appreciation of the diversity of life that surrounds him every day.

“When you understand all of the complex things that are involved in the smallest action of the smallest insect you see on the ground, they are so much more complicated,” Long said. “It’s a greater appreciation for the living world and all of its complexities.”