THERE'S A coffee shop around the corner from the weather-beaten slab of concrete that serves as the Philadelphia Police Department's headquarters.

A few minutes after a visibly worn Commissioner Charles Ramsey wrapped up his umpteenth media interview of the afternoon, Bob Dylan started echoing through the shop.

"Don't Think Twice, It's All Right." You know the song. "I'm walkin' down that long, lonesome road, babe," Dylan sang. "Where I'm bound, I can't tell."

After 47 years in law enforcement, Ramsey isn't exactly sure where he's headed, either.

During a City Hall news conference yesterday morning, Ramsey, 65, announced that he'll retire in January, before the next mayor takes office.

He arrived at the decision, which he described as "probably the worst-kept secret in Philadelphia," two years after he began to kick the idea around privately.

Politicians, from Mayor Nutter to President Obama, spent the day running through one superlative after another trying to sum up Ramsey's distinguished career, which began in Chicago in 1968 and took him decades later to Washington, D.C., where he contended with the Beltway snipers and the terrorist attacks of Sept. 11, 2001.

He ended up in Philadelphia because Nutter, fresh off his mayoral victory in fall 2007, took a train to D.C. in search of a police chief who could do something about the city's nightmarish murder rate, and had dinner with Ramsey.

"Thank you for saying yes," Nutter said, fighting off tears, as he recounted that initial meeting. "Thank you for coming to Philadelphia. Thank you for making our city a safer city."

It will take years to fully sort out Ramsey's legacy here, but the short version probably will go something like this: He drove violent crime down to lows that hadn't been seen in decades, and tried - and tried and tried - to bring ethical and procedural reforms to a department that historically has resisted change.

He didn't hesitate to fire cops who he thought didn't deserve their badges, and invited the U.S. Department of Justice to study his department's use-of-force policies after Philly.com reported in 2013 that police-involved shootings were climbing at an alarming rate.

"It's embarrassing for us all to walk by the newsstand and see another headline in the Daily News about police corruption," Ramsey said yesterday afternoon.

"I could be far less aggressive and pretend everything in the department is OK, or I could do something about it," he said.

"I'm sure I've made my share of enemies along the way, but I'm sure decent cops out there appreciate someone's finally doing something about this."

Already talk has turned to whether Deputy Commissioner Richard Ross will succeed Ramsey in January, as many police insiders have long assumed.

Democratic mayoral candidate Jim Kenney said earlier this year that he would not look outside the department for a replacement if Ramsey retired.

Republican candidate Melissa Murray Bailey said she would appoint Ross as commissioner. Ramsey offered a ringing endorsement of Ross during the morning news conference.

Ross yesterday declined to address the speculation, and instead spoke admiringly of Ramsey's willingness to mentor him and other commanders.

"He put people in a position to grow, and exposed a lot of folks to things they wouldn't have otherwise seen," Ross said.

"I've been thanking him over the last year, and he's said, 'Do me one favor: Make sure you do the same for someone else.' "

Nutter praised Ramsey's success at driving down violent crime - the city recorded 248 homicides last year, a far cry from 391 in 2007, and burglaries and shootings also have tumbled significantly.

The mayor also singled out the variety of strategies that Ramsey employed, from an early emphasis on old-fashioned foot beats to a later embrace of data and technology, like the growing use of police body cameras.

And then there's Ramsey's reputation, which seemed to grow exponentially during his time in Philadelphia. He defied the conventional wisdom about top cops having a short shelf life.

"He had a lot of respect in this city," said political consultant Larry Ceisler. "He had a political presence, but he was a very nonpolitical guy."

Obama handpicked Ramsey last year to co-chair a Task Force on 21st Century Policing, aimed at rebuilding relationships between civilians and cops across the country.

Nutter noted that Ramsey was the only police official ever to serve simultaneously as the head of two national law-enforcement organizations: the Major Cities Chiefs Police Association and the Police Executive Research Forum.

"He is widely regarded as one of the best, if not the best, urban major-city police chiefs, and he has tried to make a lot of improvements," said Ralph Taylor, a criminal-justice professor at Temple University. "This man knows what he's doing."

But Ramsey's tenure hasn't been without problems. Kelvyn Anderson, executive director of the civilian-run Police Advisory Commission, said there are still lingering concerns over the department's use of stop-and-frisk, and its willingness to be transparent about police-involved shootings.

Ramsey stressed yesterday that the department was working diligently to incorporate 91 recommendations made by the Department of Justice on use-of-force policies, many of which centered on a need for greater transparency.

"He's a reform-minded individual who's taken this department to a different level," Anderson said. "We've certainly had our differences, but overall . . . he stands out as the commissioner who's made the most substantive changes in how the department operates."

So where does Ramsey go from here?

He dropped several hints yesterday. He'd like to stay local - his son is a Philadelphia police officer - so he's interested in dabbling in teaching, maybe at Drexel University or Neumann University.

But he also talked about wanting to have "an impact nationally" on issues facing law enforcement. Those issues undoubtedly include the Black Lives Matter movement, whose members have clashed frequently with Ramsey, including during a discussion on policing Tuesday night at the National Constitution Center.

"I'm not tired. I'm not burned out," he said at the news conference. "I'm in my prime."

He also spoke of wanting to be a better husband to his wife, Sylvia, who has put up for years with the constant demands that fill a police chief's life.

"It's going to be tough for Chuck," said Terry Hillard, Chicago's former police superintendent and Ramsey's longtime friend. "It's not so much leaving the job as it is leaving those people, those relationships."

The relationships Ramsey holds most dear are the ones he built with the families of the eight police officers who died in the line of duty during his tenure here.

"He was extremely good to me and my family. He went above and beyond what I assume are the duties of a police commissioner," said Megan McDonald, whose brother, Sgt. Patrick McDonald, was fatally shot in North Philly in September 2008.

"When he announced that he was promoting my brother posthumously at his funeral, he cried. That pretty much sums up his character."

"I'm so sad. I love him," said Judy Cassidy, whose husband, Officer Chuck Cassidy, was gunned down in West Oak Lane a few months before Ramsey arrived in Philadelphia. "I hope we still get to see him."

Ramsey said the police deaths were the "most stressful" challenges he encountered. But he said he also was grateful that he'd been able to get so close to the fallen officers' families, and he jumped out of the chair in his office to hold up a photo of himself holding the baby of slain Officer John Pawlowski.

"These are my heroes," he said, gesturing toward framed photos of the fallen cops. "I'll pack them up and take them with me, and hopefully the next person does not have to do the same."

-Staff writer Dana DiFilippo

contributed to this report.

On Twitter: @dgambacorta