"Badges? We don't need no stinkin' badges!" is a widely quoted paraphrase of a line of dialogue from the 1948 film The Treasure of the Sierra Madre. That line was in turn derived from dialogue in the 1927 novel, The Treasure of the Sierra Madre, which was the basis for the film.
In 2005, the full quote from the film was chosen as #36 on the American Film Institute list, AFI's 100 Years...100 Movie Quotes. The shorter, more well-known version of the quote was first heard in the 1967 episode of the TV series The Monkees, "It's a Nice Place to Visit". It was also included in the 1974 Mel Brooks film Blazing Saddles, and has since been included in many other movies.
"All right," Curtin shouted back. "If you are the police, where are your badges? Let's see them."
The line was popularized by John Huston's 1948 film adaptation of the novel, which was altered from its content in the novel to meet the Motion Picture Production Code regulations severely limiting profanity in film. In one scene, a Mexican bandit leader named "Gold Hat" (portrayed by Alfonso Bedoya) tries to convince Fred C. Dobbs (Humphrey Bogart) that he and his company are Federales:
- Dobbs: "If you're the police, then where are your badges?"
- Gold Hat: "Badges? We ain't got no badges. We don't need no badges. I don't have to show you any stinkin' badges!"
Both a 1967 episode of The Monkees and Mel Brooks' 1974 Western Blazing Saddles shortened the line to "Badges? We don't need no stinking badges". It is this version of the phrase that went on to be quoted, paraphrased, and parodied in a variety of subsequent media, for example in the 1989 film UHF where it becomes “Badgers? Badgers? We don’t need no stinking badgers”. 
The song "Medicine Show" (1985) by Big Audio Dynamite sampled the quote by Alfonso Bedoya from the film The Treasure of the Sierra Madre. The song prominently featured quotes sampled from other westerns as well, including several by or making reference to the Eli Wallach character Tuco from the film The Good, the Bad and the Ugly. This association — as well as the similarity of voice and accent employed by both actors in their respective bandito roles — reinforces a common misconception that Wallach delivered the famous line.
- Hal Erickson (2010). "Alfonso Bedoya Movies". Blockbuster. Retrieved 2010-04-27.
- "AFI's 100 Years...100 Movie Quotes". USA Today. 2010. Retrieved 2010-04-27.
- "Treasure of the Sierra Madre, The (1948)". classicfilmguide.com. 2010. Retrieved 2010-04-21.
- Hal Erickson (2010). "The Treasure of the Sierra Madre (1948)". Blockbuster. Retrieved 2010-04-21.
- "The Treasure of the Sierra Madre". Warner Bros. 2010. Retrieved 2010-04-21.
- ""We don't need no stinking badges!" (Or badgers!)". www.quotecounterquote.com. 2012-06-11. Retrieved 2016-07-21.