Eighty-seven percent of Maryland students in the Class of 2011 received a high school diploma last spring, the highest graduation rate on record, according to state data released Friday.

Education officials attribute the improved graduation rates, up 2 percentage points from 2009, in part to the economy.

“You can’t just drop out of school and get a job these days,” said William Reinhard, spokesman for the Maryland State Department of Education.

They also credited a 2008 state mandate that students must pass four high school exams — in algebra, biology, English and government — to graduate. When the high-stakes tests were proposed, educators statewide were concerned they would encourage struggling students to drop out.

But pass rates have been high, and Maryland allowed those at risk of failing to do projects related to the content to pass. For the Class of 2011, no student failed to receive a diploma because of the exit exams, and 5,350 students, or 9 percent, met the requirement through the alternative approach.

The requirement has helped students and teachers focus on the basic skills needed to graduate, putting them on track for a cap and gown, Reinhard said.

In Montgomery County, the graduation rate for the Class of 2011 was 91 percent; in Prince George’s County, 85 percent.

Education officials also reported Friday that significantly fewer Maryland schools met ever-increasing performance targets on state tests — 55 percent, down from nearly 70 percent last year.

The proliferation of so-called failing schools is playing out around the country, thanks to a federal education law that sets the goal of 100 percent of students performing at grade level by 2014. The Obama administration plans to grant waivers to states hoping to avoid federal sanctions.