U.S. News and World Report has ranked the Maine School of Science and Mathematics in Limestone as the 19th-best high school in the nation and the 10th-best high school for science, math, engineering and technology (STEM).

The rankings released Tuesday were compiled using data on more than 22,000 public high schools in the 50 states and the District of Columbia.

The only other Maine school ranked inside the top 500 was Falmouth High School, which was ranked as the 328th-best high school in the country.

U.S. News on Tuesday also released its Maine rankings:

1. Maine School of Science and Mathematics
2. Falmouth High School
3. Wells High School
4. Greely High School
5. Freeport High School
6. Scarborough High School
7. York High School
8. Casco Bay High School
9. Gorham High School
10. Boothbay Region High School

The Maine School of Science and Mathematics was also named the nation's 6th-best magnet school, a public school that offers specialized courses and attracts a diverse student population.