Maryland students outperformed the rest of the country on their Advanced Placement exams, with nearly 30 percent of the class of 2012 scoring passing grades, according to data released Wednesday.

It marks the seventh straight year that Maryland has topped the list.

"Because of the better choices we've made together to invest in our children's future, we've built the number one public schools in the nation," Maryland Gov. Martin O'Malley said following the news.

Virginia students are not far behind, though the state slid to fifth place in the country after five consecutive years ranked third. Even so, the percentage of Virginia high school graduates scoring a three or better -- the minimum score required for a student to get college credit for an AP class -- rose from 25.6 percent last year to 27.2 percent this year.

By comparison, fewer than 10 percent of graduating seniors in the District attained the same scores, placing the District roughly 10 percent below the national average of 19.5 percent.

The District's Office of the State Superintendent of Education praised the gains the city's students have made, pointing to a "fairly steady increase" in AP participation over the last 10 years, from 584 students taking exams in 2002 to 1,512 in 2012. But the percentage of those students who passed exams plummeted over the same period, from 40 percent in 2002 to 26 percent last year.