Class of 2016 graduates at Massachusetts high schools were tops when it came to Advanced Placement exams.

For the first time, the state ranked first in the nation in results, with 31 percent of the students scoring 3 or higher on the exam, the state Department of Elementary and Secondary Education said Wednesday.

The state edged out Maryland (30.4 percent) and Connecticut (30.1 percent), according to the department’s press release.

The exam, administered by the College Board, is scored on a five-point scale. Scores of 3 or higher show that a student is capable of doing the work of an introductory college course, the statement said.


Governor Charlie Baker lauded the state’s performance on the prestigious exam.

“We are very pleased to see such a large percentage of Massachusetts students successfully participating in Advanced Placement course work and exams and look forward to continued success in expanding those efforts,” Baker said in the statement.

Not only did Massachusetts reach an all-time high on the exam’s performance, but it also led the nation in overall participation, the statement said.

Approximately 44.1 percent of students enrolled in the Class of 2016 took at least one exam, a 4.1 percent increase from the prior year, the statement said.

“It is encouraging to know that these strong results occurred even as the number of students taking Advanced Placement courses increased,” Secretary of Education James Peyser said. “Congratulations to all of the students and teachers whose hard work is reflected here.”

Jacob Geanous can be reached at jacobgeanous@globe.com. Follow him on Twitter @jacob_geanous.