The pic showed Melissa Adamson, a part-time cop in McKeesport, wearing a uniform and sunglasses in a car, under the caption, “I’m the law today n—a.”

It’s unclear how the photo came to her bosses’ attention.

But once it did, Adamson lost the job. The same day, she also resigned from another part-time gig as a police officer in Versailles.

Adamson told WTAE she took the photo months ago, and is seen wearing the uniform for the Pitcairn Police Department. She resigned from that department just one week before getting fired from McKeesport.

She called the photo “a stupid mistake” — and insisted she’s not a racist.

“Everyone that knows me knows I don’t have a racist bone in my body,” she said.

“And people who don’t know me, I can understand why it was misconstrued to where it looks racist. But like I said, everyone who knows me knows I’m not racist. I don’t want this to affect how I do my job.”

Adamson said she sent the photo to some friends on her first day on the job. She implied that a fellow officer that she is feuding with posted it on Facebook.

The mayor of McKeesport said Adamson’s firable photo emerged while she was still in probationary training for the city’s department.

“This post displays a degree of conduct and character that is far different from what I would expect from an officer in this city,” Mayor Michael Cherepko wrote in a Facebook post.

“It is absolutely unacceptable. Without hesitation, my office and the police chief’s office immediately concluded that this officer’s actions will not be tolerated in the City of McKeesport.”

Adamson could not be reached for comment. The McKeesport, Versailles and Pitcairn police departments did not immediately return Daily News messages.