A Texas state trooper on the job for nearly 20 years is being reprimanded for posing in a photo with Snoop Dogg that went viral on the rapper's Instagram account in March.

Billy Spears, the trooper, is suing (PDF) the Texas Department of Public Safety (DPS) who dinged him for being in "a photo with a public figure who has a well-known criminal background including numerous drug charges. The public figure posted the photo on social media and it reflects poorly on the Agency," according to the reprimand.

"They kinda made this up on the fly," the trooper's attorney, Ty Clevenger, told Ars in a Tuesday telephone interview. "They could not point to any policy, rule, order, or law."

Here's what got Spears disciplined, according to his lawsuit:

...Trooper Spears worked an approved off-duty job as backstage security at the SXSW concert in Austin. While Trooper Spears was working backstage, an assistant to Calvin Broaddus, a.k.a. "Snoop Dogg," asked if he could take a photograph of Snoop Dogg standing next to Trooper Spears. Trooper Spears agreed, and the Doggfather's assistant later posted the photograph to Instagram with the caption "Me n my deputy dogg."

Spears' attorney pointed out that about five years ago, two troopers gave Willie Nelson a tour of the state capitol building and posed for a picture, but they were not reprimanded.

"Apparently it’s OK to be photographed with a long-haired white musician who smokes weed, but not a long-haired black musician who smokes weed (and I can’t wait to hear how DPS is going to try to explain that to an Austin jury)," Clevenger wrote on his blog.

The agency declined comment, telling Ars in an e-mail that it "does not discuss ongoing litigation."

Clevenger also suspects the reprimand was in retaliation for Spears complaining about a fellow officer. Spears was briefly detained at a concert in Lake Fork while in plain clothes after he and another off-duty Texas officer working security exchanged words.

"I think their true motive was retaliating against Billy," Clevenger said.

Spears was reprimanded for that February incident for unprofessional conduct that "reflected poorly on the Department."

Clevenger said being disciplined three times could lead to a suspension and can hinder one's ability to be promoted.

The suit seeks unspecified damages and said the disciplinary incidents, known in the department as "counseling" incidents, cannot be appealed.

"DPS superiors need not prove that any policy, rule, order, or law was violated, yet they can still punish a politically disfavored trooper such as Trooper Spears without fear that the trooper will appeal," Spears' lawsuit says.