A bid to save its drug-dealing owners by alerting them to a police raid has landed a parrot in police custody.

Police in Brazil’s Piaui state ran into the parrot — dubbed as "papagaio do trafico" or "trafficking parrot" by news outlets — at the home of two alleged crack cocaine dealers, Brazil's R7 news channel reported.

As police searched for the suspects, the parrot nearly succeeded in alerting them by repeatedly yelling "Mamae, policia!" or "Mama, police!"

"He must have been trained for this," one officer involved in the operation said of the parrot's attempt to interfere with law enforcement, the Guardian reported. "As soon as the police got close he started shouting."

The bird's efforts did not bear any fruition. Footage of the raid's aftermath aired by R7 showed police cataloguing small bags of crack while the parrot sits obediently on a countertop next to a racecar helmet and a glass bottle, according to The Washington Post.

Its apparent owners, a man and teenage girl, were arrested, local newspaper Meio Norte reported.

The parrot was then seen being carried by a cop out of the house on his hand before being placed in a cage.

It was taken to the Teresina Police Department, where it remained in total silence “even as law enforcement sought to loosen it up.”

The suspect couple's defence attorney, Salma Barros, has questioned how the yelling parrot could remain totally quiet in the police station.

An environmentalist named Jaqueline Lustosa told Meio Norte that she had gone to the police department to free the bird. Reports said the parrot had been taken to a local zoo, where zookeepers would train it how to fly.

The pet's stubborn silence continued even there, a veterinarian said. "Lots of police officers have come by," veterinarian Alexandre Clark said Wednesday, according to the Guardian, "and he's said nothing."