MODERN FAMILY’s tough-talking ED O’NEILL rocked the set by tossing off a shocking gay slur during a profanity-laced interview.

The 66-year-old former “Married…With Children” star was talking about his days as a hot-headed college football player who took de­light in taunting opposing coaches.

O’Neill told a “ROLLING STONE” reporter that if a coach yelled at him for a rule violation, he would explode in a string of expletives and question his critic’s manhood by snapping: “What are you, a fag?”

O’Neill said those tirades “just made me happy.”

But his incredibly callous crack has thrown the “Modern Family” set into turmoil.

It was a slap in the face to Ed’s openly gay co-star Jesse Tyler Fergu­son, who plays his homosexual son Mitchell.

“Jesse realizes that Ed prob­ably wasn’t thinking when he said that, but it doesn’t make the words any less hurtful,” a set insider told The ENQUIRER.

And the remark hit especially hard, explained the source, “because ‘Modern Family’ is the most gay-friendly show on TV.

“Ed’s coming off as a totally tasteless, inconsiderate bonehead!”

This is not the first time the Emmy nominee, who plays Sofia Vergara’s gruff TV husband Jay Pritchett, has fired off insensitive remarks.

In 2010 he likened a gay kiss between “Modern Family” characters Mitchell and Cameron to “a sort of pornography” and labeled Cameron a “stay-at-home mom.”

Gay blogs blasted the crusty actor as a homo­phobe, but the source insists that’s not so.

“Ed sometimes suf­fers from foot-in-mouth disease,” explained the insider. “But he’s got tons of gay friends and doesn’t have a ho­mophobic bone in his body.”