Maryland’s public school system achieved top-in-the-nation status for the fourth consecutive year, according to an analysis of state-by-state education policies and student achievement being released Thursday.

The state was given an overall grade of B-plus by Education Week, which publishes the annual report. The average grade for the nation was a C. Virginia came in fourth with a B. And the District came in 49th, just ahead of Nebraska and South Dakota, with an overall grade of C-minus.

The evaluation includes dozens of indicators of student achievement, academic standards and accountability, teacher quality and school finance.

“Maryland is an example of an all-around strong performer,” said Chris Swanson, a vice president at Editorial Projects in Education, which publishes Education Week. The state has improving test scores, state policies that support school improvement, and comparatively high graduation rates and participation on Advanced Placement tests.

Bernard J. Sadusky, Maryland’s interim state superintendent of schools, said the accolade is a compliment to the state’s teachers and local superintendents and says much about the governor’s and legislature’s commitment to education. Still, he said, Maryland has a lot of work to do to eliminate racial and socioeconomic disparities in school performance.

A closer look at how Maryland fared in various parts of the evaluation showed strong performance overall. For example, Maryland was among the top 10 states in improving its overall scores on the National Assessment of Educational Progress, otherwise known as the Nation’s Report Card, between 2003 and 2011.

On the reading test, 40 percent of eighth-grade students scored proficient or advanced on the 2011 test, giving the state a seventh place ranking. (Maryland and the nation still have a lot of room to improve).

But the so-called “poverty gap,” or the difference in scores between those eligible for free lunches and those not eligible, was much less favorable.

The 27-point difference in scores was about the national average. Thirty-seven states had a narrower gap.

Forty percent of eighth-grade students in Maryland also scored proficient or advanced on the math test, putting the state in 13th place.

But the 32-point “poverty gap” in scores was significantly higher than the 26-point national average. Maryland came in second-to-last.