A graffiti artist who was commissioned by the city of Detroit, Mich., was arrested on Wednesday by police officers who thought he was committing an act of vandalism.

Sheefy McFly, 29, was painting a mural on a viaduct on the city's northeast side as part of a multi-year effort to fight illegal graffiti when multiple police cars arrived on site.

McFly, whose real name is Tashif Turner, didn't have his city-issued permit on him, according to the Detroit Free Press.

ROMAN SOLDIERS' VERY RUDE GRAFFITI REVEALED NEAR HADRIAN'S WALL

McFly said he tried to explain the situation — and a city official even showed up to vouch for him — but police wouldn't budge. Nicole Kirkwood, a spokesperson for the Detroit Police Department, said officers felt McFly wasn't cooperating.

The graffiti artist was ultimately arrested on suspicion of resisting and obstructing and on a warrant for an old parking ticket.

“It’s an oxymoron — doing something for the city and being arrested by the city,” McFly told the outlet on Friday. “They treated me like a felon even though I was commissioned by the city to do this."

McFly said he was detained for roughly 24 hours before he was released. He said he's scheduled to appear in court on July 3 for the parking ticket warrant.

CLICK HERE TO GET THE FOX NEWS APP

McFly's contract with the city as part of the City Walls program, worth $10,000, required him to paint 10 murals — the first of which he was arrested for. The executive who oversees the program told the Free Press that the situation was a misunderstanding.

“When we’re doing murals, we have a police lieutenant we work with to make sure surrounding precincts are aware that it’s a city-sponsored program and the artists have permits,” Brad Dick said. “Unfortunately, some random officers who weren’t associated with the nearby precincts drove by and saw him and thought it was an unauthorized action. They stopped him and he didn’t have his permit with him.”

Dick said other artists have also been stopped by police in the past, but said they had their city-issued credentials with them. He said that the program will soon include artists to wear identifying lanyards while working on their murals.

The Associated Press contributed to this report.