Schools in Bangor and Cumberland have been named the top public elementary and middle schools in Maine, according to new rankings of K-8 schools from U.S. News & World Report.

The Washington D.C.-based publication, long known for its high school and college rankings, on Tuesday released data for the first time on more than 80,000 public elementary and middle schools across the country. The schools are ranked at the state and district level using a methodology based primarily on state test results and how well students performed compared to expectations.

Fruit Street School in Bangor was named the top elementary school in Maine followed by Longfellow Elementary School in Portland. Cape Elizabeth’s Pond Cove Elementary School was third followed by Yarmouth Elementary School.

Greely Middle School in Cumberland ranked first among middle schools followed by Falmouth Middle School and William S. Cohen School in Bangor.

The rankings are based on state assessment data from the 2018-19 school year and therefore pre-date the impact of the COVID-19 pandemic on test-taking. They do not include private schools.

For each state, schools were assessed on their shares of students who were proficient or above proficient in their mathematics and language arts state assessments. Half the ranking formula was the results themselves; the other half was the performance results in the context of socioeconomic demographics.

Students from low-income backgrounds and historically underserved populations tend to score lower on standardized tests, according to U.S. News, so the publication factored the percentage of students eligible for free and reduced lunch and the number belonging to underserved ethnicity groups into its performance predictions. The predictions were then compared to schools’ actual results.

For schools that performed identically on both state assessment indicators, the school with higher overall proficiencies broke the tie. For cases where proficiencies were equal, a second tiebreaker was whichever school had the lower student-to-teacher ratio.