Lt. Scott Finn had a toothache.

But before he went to the dentist, the nearly 12,000 people who follow the Prince George’s County police department on Twitter heard about it. They also learned that during his shift one recent Friday, Finn and his colleagues reunited a disoriented older man with his family, recovered a stolen dirt bike and confiscated a concealed weapon from a felon.

The details were posted as part of a “Tweet­along” aimed at showing the public a side of law enforcement they rarely see. Next to Finn the entire evening, the police department’s chief spokeswoman, Julie Parker, documented his every move.

“Social media helps us tell the whole story,” said Finn, driving a cruiser with Parker staring at an iPad while in the passenger seat. “It lets people make a decision about us based on facts and not someone else’s interpretation of the facts,” he said.

As law enforcement agencies look to social media to share information about everything from road closures to the location of a weekend DUI checkpoint, they are also leveraging the medium to improve their reputations and community relations. Prince George’s County has been particularly assertive in this area. While even some of the department’s staunchest critics say the county is safer and the agency’s relationship with the community has markedly improved over the past 20 years, the county is still working to overcome a past once marred by police brutality, corruption and high crime rates.

“It’s hard to erase the years of things that have happened,” said Bob Ross, president of the county’s NAACP branch.

The push to transform the face of the police department through its media relations division began in 2011, when Chief Mark A. Magaw hired Parker, a television news reporter at the time, to run communications.

“When I first came in, I said I needed to go outside the department to find an industry professional that knows the D.C. area that would be interested in helping us tell our story,” Magaw said. “Culturally, there would be two or three officers in the public information office. They’d answers questions very bluntly and had no relationships with the press people. This created a natural distrust both ways.”

Often, the media would report mostly about negative news — officer misconduct, homicides, shootings — and pay attention to little else, Parker and Magaw say. It was a problem of perception.

“I don’t think anyone would argue that the police department had a problem with its reputation,” said Parker, who worked as reporter in the D.C. region for 18 years. “But what I knew as a journalist is that there had to be stories that are good that are not being told.”

Since Parker came on board, she’s been trying to tell those stories.

On its blog, the department announced the quick arrests police made after a fatal shooting during a hotel robbery. On Facebook, it posted pictures of officers creating a makeshift leash out of crime tape when they found a lost dog. And on Twitter, there are images of officers changing tires for stranded drivers and installing child car seats. Residents can also post items, including photos. Now, law enforcement agencies across the country look to Prince George’s as an example of how to run a community and media-friendly communications division.

Julie Parker, media relations director for Prince George’s County’s police department, takes photos for her tweets while with a “ Robbery Suppression Team” in Langley Park. (Amanda Voisard/For The Washington Post)

The perkier image of Prince George’s police would have been a hard sell in the early 1990s, when problems within the department dominated the news.

In 1993, Archie Elliott III, 24, was shot to death by two police officers, including one who worked for Prince George’s.

After police pulled him over for suspicion of driving under the influence, Elliott was handcuffed with his hands behind his back. During the arrest, the two officers shot Elliott 14 times. The officers, who said Elliott had pointed a gun at them, were eventually cleared of all charges. But his death — and a series of other deaths at the hands of police — prompted residents, including Redmond Barnes, to create the People’s Coalition for Police Accountability in the early 2000s.

“We thought that this is not the police department that we deserve,” Barnes, 65, said.

Problems persisted. In summer 1999, the U.S. Department of Justice began investigating the inappropriate use of force by the county’s K-9 unit, later expanding the probe to review police brutality in the entire department. In 2005, the county recorded 161 homicides, about one every other day. And in 2010, Chief Roberto L. Hylton left the department after three officers were arrested during a federal probe into countywide corruption by former county executive Jack B. Johnson (D).

In recent years, however, relations between the police and the community have vastly improved, Barnes and Ross said. The number of complaints about the department filed with the NAACP has dropped from several each week about four years ago to about one a month. And homicides in the county plummeted to 57 last year, a number Prince George’s hadn’t seen since the mid-1980s.

Although things have gotten better, it will be hard to wash away all the sins of the past through happy stories of police officers helping residents, Barnes said.

“Among my peer group, among the people who are 40-plus, we haven’t forgotten it,” said Barnes, who has lived in the county since 1977.

It may be an uphill battle for some agencies, but social media is making it easier for police departments to win a community’s trust, said Eugene O’Donnell, a professor of law and police studies at the John Jay College of Criminal Justice in New York. Police now have greater control over the stories they want to tell, he said.

For Prince George’s, the effort hasn’t been without some snags.

There was a swift national backlash to an advertised “tweetalong” of a prostitution sting, with critics saying the effort would harm people who had not been convicted of crimes and drive sex workers further underground.

Police departments, however, are also savvier about putting out their own bad news, O’Donnell said. If an officer is accused of misconduct or the department has to deal with other controversy, it’s easier for officials to get out in front of the news and put their own spin on it.

But Parker said there’s more to it: “If you come forward during the hard times, you’re going to build trust and credibility. You may take hits initially, but in the long run, people will appreciate the transparency.”

Finn said that in his 19 years on the force, it was difficult for the department to communicate with residents. Now, social media has made it easier to give the public a look at what officers do and remind the community that police are people, too — toothaches and all.

“The public, a lot of times, they don’t get to see both sides of it,” Finn said. “Now they get to see the good, and they get to see the bad.”

Aaron C. Davis contributed to this report.

Get updates on your area delivered via e-mail