Students in Massachusetts lead the nation in achievement on Advanced Placement exams, according to the nonprofit group behind the tests.

More than 32 percent of Massachusetts students who graduated from public high schools last year scored a three or better on at least one test, according to a report released Wednesday by the College Board.

They edged out students in Maryland, where 31.2 percent of 2017 graduates scored a three or better, effectively meaning they passed. Nationally, 22.8 percent passed an exam.

It's the second year in a row in the top spot for Massachusetts, which also had the greatest increase in performance over the last decade.

"Massachusetts wins the prize," David Coleman, president and CEO of the College Board, said in an interview. "It is the state for two years running that has most expanded both access and performance, simultaneously."

Gov. Charlie Baker said Massachusetts is proud of its students and teachers.

"Our state is focused on providing kids from every ZIP code with a quality and affordable education from early education to post graduate, and will keep working on opportunities to provide pathways to success for all," he said.

The College Board says it now works with 22,000 high schools across the U.S. to offer Advanced Placement courses, which are meant to align with introductory college classes.

Students who participate can take AP exams that some colleges accept as course credit, if the student scores well. Each exam typically carries a $94 fee.

Although some education experts debate the program's effectiveness -- and some critics say the quality has fallen amid expansion -- the College Board's new report says there has been continued improvement.

It says the number of students taking AP exams and the number scoring three or better over the last decade have both increased by nearly the same amount, about 70 percent.

"The wonderful thing is that performance has kept pace," said Coleman, adding that much of the growth has been at low-income schools. "Many would never expect this."

Michael Hansen, a senior fellow at the Brookings Institution who specializes in education, says the report's findings are "very encouraging" but aren't likely to end debate over the program.

"The evidence is not at all clear that what you do on an AP test is all that strong of a predictor of how you're actually going to do in class," he said.

Among students who succeed on the test, black and Latino students have been growing the fastest. Last year they made up 27 percent of all students scoring three or better, compared to 17 percent in 2007.

Coleman credits states that have offered subsidies to help low-income students pay for exam fees, and to other groups that have worked to expand and improve AP programs.

In Massachusetts, for example, the state pays the nonprofit Mass Insight Education and Research to boost programs in districts with diverse student bodies.

Susan Lusi, president and CEO of Mass Insight, said it's a strong partnership that helps the state offer challenging academic opportunities.