Amid a bumpy start to this year’s legislative session, Maryland Gov. Martin O’Malley traveled to Washington on Thursday to bask in the glory of a fourth straight No. 1 ranking for the state’s public schools by a Maryland-based nonprofit.

The four years atop the annual survey by Education Week magazine have become shorthand for Maryland politicians to tout the state’s commitment to classrooms, and political gold for O’Malley and incumbents from Congress on down.

“It’s great to be here. We love Education Week magazine in the state of Maryland,” O’Malley said at the outset of what amounted to an acceptance speech Thursday at a conference hosted by the group.

As in recent years, Maryland ranked near the top in several survey categories, and back in the middle of the pack in others. But overall, the state’s score averaged out to a B+, the highest, and narrowly topped Massachusetts and New York. Virginia came in fourth.

O’Malley has mentioned the ranking perhaps more than any other statistic since Maryland first took the top spot in 2009. He has cited it is as evidence that his policies of increasing classroom spending and borrowing for school construction have reaped big rewards.

The governor continued on that path Tuesday, calling on the state’s General Assembly to approve over $370 million in borrowing for new school construction in the budget year beginning in July. It would be the second-highest amount in state history, behind a record $400 million allotted in his first year in office. O’Malley said that if approved, the latest boost would support some 11,650 construction jobs.

The Education Week ranking, however, is not uncontroversial in Maryland, as well as among some critics in the education community.

Civic leaders in Prince George’s County and in Baltimore have scoffed at it at times in recent years, saying it belies continued achievement gaps between whites and minorities and between students in affluent areas and poor ones, where test scores still lag considerably.

Detractors also say relatively wealthy states like Maryland get a leg up in the survey for surprising things. In its “chance for success” category, for example, states’ scores are affected by average family income and whether children have at least one parent with a post-secondary degree. Maryland ranked fifth among states overall in the category.

Scores on Advanced Placement tests, which in Montgomery County are often far above national and state averages, also pull up those in less wealthy areas of the state.

Maryland’s only outright top score among states in the Education Week survey was in a bracket that measures efforts to assess and transition youngsters into elementary school, adolescents into middle school and high schoolers into college.

Maryland ranked third in teaching and K-12 achievement; seventh in school financing; and 24th in standards, assessments and accountability.