In late 2008, Ferrell and McKay met with Wahlberg to see if they would click. ''We had this amazing dinner and drank a bunch of wine,'' Wahlberg remembers. ''They were like, 'What do you think about doing a comedy with us?' I was like, 'Are you kidding me?' It was almost too good to be true.'' Ferrell and Wahlberg had each flirted with the idea of doing a different buddy-cop film, Cop Out, which was released earlier this year with Bruce Willis and Tracy Morgan in the starring roles. But McKay felt they should go in what he considered a fresher direction. ''The buddy-cop movie is, for all intents and purposes, pretty much dead,'' McKay says flatly. ''There hasn't been a good one in, what, 20 years?'' Rather than simply parody the conventions of Lethal Weapon, Beverly Hills Cop, and the like, McKay wanted to inject the genre with some ripped-from-the-headlines relevance by making the villain a Bernie Madoff-style Wall Street crook. ''All those old movies had drug-smuggling story lines if you did that now, it would be quaint,'' says McKay. ''Who gives a s about guys selling drugs at this point? Crime has taken on massive proportions: destroying the Gulf of Mexico, stealing $80 billion. Stealing a billion dollars is nothing now that's almost adorable.''
Early last year, McKay and Ferrell made the rounds at several studios to pitch the idea of Ferrell and Wahlberg playing a pair of incompatible second-string cops. Even though there was still no script, a bidding war broke out, with Sony Pictures eventually landing the project. ''It was a similar situation with Talladega Nights,'' Ferrell remembers. ''With that one, we basically just had the idea of me as a NASCAR driver, and it became a crazy bidding war.''