Commissioner Charles H. Ramsey couldn't stand the thought of burying another one of his own.

It was March, and he had long been thinking of retirement, ever since Mayor Nutter had won reelection. Even then, he had been "95 percent sure." His career was at an apex - there had been presidential appointments, and prominent positions on national policing boards, and an unprecedented drop in homicides in a city once dubbed "Killadelphia."

And now he was eulogizing Sgt. Robert Wilson III, gunned down in a robbery gone wrong, the eighth officer he had laid to rest.

The commissioner recalled in an interview Wednesday that he went home that night and turned to his wife.

"I don't think I can bury another cop," he said.

Ramsey, 65, who led Philadelphia's Police Department through eight years of dramatic declines in violent crime - and who has emerged as a major voice in a national dialogue on community policing - announced Wednesday that he will retire early next year.

At a City Hall news conference, Ramsey described his decision as a personal one, not motivated by politics, but one that will nonetheless coincide with the swearing-in of Philadelphia's next mayor.

"It just felt right," he said.

Still, Ramsey said there remains much he wants to accomplish in policing - but, now, on a national level.

"I'm not burned out - I'm actually in my prime," he said at Wednesday's news conference, to laughter and nods of appreciation. "It's time to move to another level, and I think I can do that with national issues facing law enforcement today."

Nutter, who recruited Ramsey out of retirement, paused to collect himself during Wednesday's news conference as he spoke of the commissioner's accomplishments.

"Thank you for saying yes. Thank you for coming to Philadelphia," he said. "Thank you for making my city a safer city."

Ramsey began his career with the Chicago Police Department at 18 and rose through the ranks to deputy superintendent. He served as police chief in Washington from 1998 to 2006. He had been retired for a year when Nutter rode a train to Washington's Union Station to persuade him to come to Philadelphia.

'Crime emergency'

Ramsey entered a department swamped by crime and scarred by corruption scandals. Brought in as the city's homicides spiked to nearly 400 in 2007 - as newly elected Nutter declared a "crime emergency" - Ramsey was tasked with creating a plan to fight violent crime in just 30 days. He would go on to oversee the department through a 25 percent drop in killings (although homicides this year have ticked up slightly and shootings are up by 16 percent).

The 247 murders reported in 2013 were the lowest since 1967.

"There are young people alive today who 10 years ago may not have lived in our city," Nutter said at Wednesday's news conference.

During his time at the department, Ramsey increasingly embraced the concept of community policing, relied more heavily on crime data, and reconfigured patrol operations to put more officers on patrol and focus on the most crime-ridden areas of the city.

He also increased education requirements for recruits and instituted several training initiatives.

"Those are things I really feel good about," he said.

He fired hundreds of officers snared in corruption and misconduct cases - 260 in all, though some later returned to duty through union arbitration.

He was widely seen as a transformative force in the department, with an approval rating of 75 percent among Philadelphians.

His tenure has not been without controversy. In 2010, civil rights attorneys filed a lawsuit alleging that the department's stop-and-frisk policies were racially biased and unjustified. Activists have slammed him for clearing the officer who shot and killed 25-year-old Brandon Tate-Brown last year.

And after a spike in police-involved shootings in 2013, Ramsey called in the Department of Justice to investigate his own department's use-of-force practices.

The result, released in March, was a report concluding that "significant strife existed between the community and the department" and recommending changes in rules surrounding shootings and training for rookie officers and an overhaul of the disciplinary process that investigates officers involved in shootings.

"The new chief will walk into their office with a report on their desk that says, You've got to address these things, ASAP," said the Rev. Mark Tyler of POWER, a clergy group that was at the forefront of protests in the Tate-Brown case. Ramsey has pledged to adopt all of the recommendations, and said Wednesday that the department expects to have them completed within the next two years.

As protests over police-involved shootings - especially those involving unarmed black men killed by white officers - escalated throughout 2014 and 2015, Ramsey became a familiar voice in national conversations on policing and community relations, stressing the need for police to build trust in the communities they serve.

He was appointed to President Obama's 21st-Century Policing Task Force late last year and spent months crisscrossing the country to attend town-hall meetings and focus groups. The group later produced an extensive list of recommendations for departments around the country and encouraged agencies to operate with transparency and diversity in mind and to change training practices accordingly. Ramsey pledged to adopt those recommendations, too.

"I am extraordinarily grateful for Chuck's service," Obama said in a statement Wednesday.

First, a vacation

Kelvyn Anderson, the head of the city's Police Advisory Commission, called Ramsey "one of the most reform-minded leaders of this department in some time." Though there is work yet to be done - continuing to enact proposed reforms and to improve relationships with "folks on the ground" - Anderson said Ramsey "can be proud of the department he's leaving behind."

On Wednesday, Ramsey was in a buoyant if bittersweet mood. Speaking of his future, he hinted at opportunities in the private sector or a teaching gig at Drexel University, but said his first move upon leaving office would be to take a vacation with his wife.

Leaving, he said, was a load off his shoulders.

"But it's hard to walk away from something you've done your whole life," he said.

He paused, and then recalled one night when he was just a rookie cop in Chicago, in the mid-1970s. It was early summer, balmy, and "the [police] radio was just popping."

"It was one thing after another - we went from call to call, and I thought how much I enjoyed it, and that it would be a sad day when I had to stop doing this," Ramsey said.

"Well, you wake up one day, and there it is."

awhelan@philly.com

215-854-2961 @aubreyjwhelan

Inquirer staff writers Mark Fazlollah and Julia Terruso contributed to this article.