For the fifth year in a row, Maryland’s public school system took the top ranking in an annual study that examines state education policies and student achievement across all 50 states and the District.

Education Week gave Maryland a B-plus in its “Quality Counts 2013” assessment. Maryland was the only state to earn the grade.

Massachusetts, New York and Virginia trailed immediately behind Maryland, with overall grades of B. These four states maintained the same rankings they held in last year’s report.

Although the District is not a state, Education Week included it in the evaluation and ranked it 45th overall with a C-minus.

The nonprofit Editorial Projects in Education publishes Education Week, which relies on policy surveys of the states and data from such sources as the U.S. Department of Education and the Census Bureau to develop its rankings.

Using more than 100 indicators, researchers review graduation rates, achievement gaps, support for teachers and education funding.

Maryland received high marks for its investment in early childhood education and policies related to college and workforce readiness, according to the publication.

Maryland Gov. Martin O’Malley (D) said the state’s commitment to funding education amid the economic downturn has allowed for its continued success.

“Every year, there’s a challenge to sustain the big investment we’ve made in education,” O’Malley said. “But when you see the results and the greater numbers of kids graduating and taking AP courses and entering kindergarten ready to learn, those accomplishments make it a little easier to justify and defend the investment.”

O’Malley said it also helps that Maryland boasts the highest median household income in the nation and has one of the most educated workforces in the country.

But despite the success, said Judy Jenkins, director of curriculum for the Maryland State Department of Education, the state still has challenges.

“We’re excited, but on the other hand, we’re also thinking about how we need to continue the improvements to provide our children with the highest level of instruction possible,” she said.

“We know that in terms of eliminating the achievement gap, we still have much work to be done,” she added.

South Dakota was ranked last, with a D-plus. The nation overall got a C-plus.