Boston Police Commissioner Edward Davis, who led his department's response to the Boston Marathon bombing, says he's stepping down after seven years on the job.

Davis said Monday it's been an honor to serve the people of Boston and thanked a number of individuals, including Mayor Thomas Menino. He says Menino showed him the importance of connecting with the community.

The 57-year-old Davis was appointed Boston's top cop by Menino in 2006. He previously served as the Lowell, Mass., police superintendent.

He says he plans to leave his post in 30 to 60 days, but it depends on how the Red Sox fare in the playoffs.

Davis says he has several options for his future but is leaning toward a fellowship offer from Harvard University. He refused to talk about speculation that he's line for a federal post.

The decision by Davis to step down is perhaps not surprising. Boston is poised to have a new mayor for the first time in two decades after Menino opted not to seek another term.

A statement from Menino's office thanked Davis for his "tremendous work over the past seven years" and promised to work with Davis to ensure a smooth transition when new mayor finds a permanent successor.

Davis was thrust into the national spotlight on April 15 when twin explosions near the marathon finish line killed three people and wounded more than 260.

Along with Menino and Gov. Deval Patrick, Davis ordered a daylong, city-wide lockdown after the two bombing suspects were involved in a shootout with police.

Once suspect died following the gun battle, a second was later taken into custody and is awaiting trial.

Delivering the commencement address at the University of Massachusetts Lowell a month later, Davis said the bombing taught him much about police work — and the resiliency of human beings.

"I learned to think the unthinkable," Davis said. "I learned that the most horrific of circumstances can produce the most inspirational and heroic of actions, not just by one single person, but by hundreds of them."

Davis' departure comes just as the race to replace Menino kicks into high gear. A preliminary election on Tuesday will whittle a dozen candidates down to two for the Nov. 5 election.

The Associated Press contributed to this report.