“Modern Family” star Sofia Vergara is in early discussions to play one of the female leads in 20th Century Fox’s “The Three Stooges.”

Peter and Bobby Farrelly are directing the pic, which is set to star Sean Hayes as Larry Fine and Will Sasso as Curly Howard, though the search for Moe Howard continues.

Current plan calls for the Farrellys to deliver a PG-rated pic divided into three, 27-minute segments driven by physical comedy. Vergara would star in the second vignette as a femme fatale who tries to trick the Stooges into killing a man for money, which the slapstick trio needs in order to save their orphanage from being closed.

The Farrellys are producing with their Conundrum partner Bradley Thomas and Charles B. Wessler, while Earl Benjamin, the gatekeeper of the Stooges’ estate, will exec produce.

Fox exec Jeremy Kramer is overseeing the long-gestating project, which the Farrellys originally developed at MGM before it landed at Fox. “The Three Stooges” is scheduled for release sometime in 2012.

Vergara is no stranger to bigscreen laffers, having starred in a pair of Tyler Perry pics, “Meet the Browns” and “Madea Goes to Jail.” She will next be seen in “The Smurfs,” and is also set to voice a role in “Happy Feet 2.”

Vergara is currently filming New Line’s ensemble romantic comedy “New Year’s Eve.”

She is repped by WME and Untitled.