The police officers from 11th and 12th district of Detroit - trying to execute an undercover project - ended up making a fool of themselves when both the groups thought that the other is needs to be arrested and got into a physical confrontation with each other.
Posing as drug dealers, the ones from the 11th district were hiding in a house when the other group arrived. Thinking them to be buyers, they tried to arrest them and it led to a huge fight.
My personal theory is that they got high themselves, to get into the skin of the character and it led to the fuck up. But this is my theory, don't take my word for it.