Five Long Island high schools ranked in the top 200 of the most challenging in the nation, according to an annual list compiled by The Washington Post.

None cracked the top 100 on the list, which was released Friday, but Locust Valley had the highest ranking on the Island with a national placement of 120 on the list.

Locust Valley was followed by Manhasset High School, 157, The Wheatley School in Old Westbury, 159, South Side High School in Rockville Centre, 165, and Syosset High School, 200.

The 2017 list is based on 2016 data.

The schools were ranked based on the number of Advanced Placement, International Baccalaureate or Cambridge Advanced International Certificate of Education tests given each year divided by the number of seniors who graduated in May or June, according to the Post.

The percentage of students qualifying for free lunch and each school’s average scores on the SAT are also noted.

advertisement | advertise on newsday

The Locust Valley School District’s website touted the achievement. Locust Valley High School also ranked No. 4 in the state on the list.

School officials said the rankings recognize the accomplishments of students and faculty. Superintendent Anna Hunderfund noted the district has an open-access policy for all students to rigorous, college-level curricula and assessments. The high school, with about 690 students, offers an International Baccalaureate program and 14 Advanced Placement courses.

“Given that we do not limit student access to these courses on any basis including family wealth, classification, grade point average or prior academic achievement,” Hunderfund said in a statement. “ . . . as a result of this open access, more than 85 percent of our students routinely complete these rigorous courses, our students, faculty, Board of Education and residents have a great deal of which to be very proud again.”

Top ranked in New York State was City Honors in Buffalo, a grades 5-12 magnet program within the Buffalo Public Schools that focuses on acceleration, enrichment and the International Baccalaureate Program, according to that school’s website.

Leading the list nationally was Basis Phoenix, an Arizona public charter school that aims to educate students at an internationally competitive level and is in its fifth year of operation.

The list — now in its 30th year — is calculated by The Washington Post’s Jay Matthews, who said it has shown “a sustained increase in the number of schools that qualify through AP, IB and Cambridge test participation, even though the vast majority of U.S. schools still do not make the list.”

It also does not include any magnet or charter high school that draws such a high concentration of top students that its average SAT or ACT score exceeds the highest average for any normal-enrollment school in the country.

The Post list differs from one compiled by U.S. News & World Report, which evaluates graduation rates and state proficiency tests to determine a school’s score.