There are many stories of referees getting physically attacked — even beheaded — in Brazil, so one official in an amateur match decided he wasn’t going to mess around and pulled out a gun when the players turned on him.
According to Globo, the ref, who the local football federation says is a military police officer by trade, was slapped and kicked by players who wanted an opponent sent off (note: this will only convince a referee to show you a red card instead). So he went to the dressing room and came back onto the pitch with a gun.
The other officials were able to calm him down without any shots being fired and he will now meet with a psychologist while punishment is considered. Still, you should probably think twice before doing anything to upset a referee ever again.