By David Bauder Associated Press

NEW YORK – If Phil Dunphy’s insistence that he’s a Realtor and not a real estate agent on “Modern Family” this week seemed a little odd, be aware that ABC was paid to make that distinction.

The plot twist was part of a new advertising campaign by the National Association of Realtors. At a time of fear among advertisers that their messages are getting lost, it represents a tactic beyond the casual product placement of a soda can or car in the background of a television scene.

In the episode that aired Wednesday, the Dunphy character twice makes the point that he’s a Realtor. Dunphy wins a battle with Gloria Pritchett’s nemesis by confronting her with insider knowledge gleaned from his profession: that there’s been illegal construction on the woman’s property, and her grandson is attending an out-of-district school.

At the show’s end, Dunphy straightens an “R” insignia pinned to his suit jacket.

The Realtors are touting their services over licensed agents who are not members of their association, and trying to counter a trend where more consumers are doing their own real estate research to avoid paying fees, said Elizabeth Mendenhall, incoming president of the association.

With Dunphy, portrayed by actor Ty Burrell, the group sensed an opportunity: a main character on one of television’s most popular comedies who sells real estate.

“He’s now one of America’s best-loved Realtors,” Mendenhall said.

Neither Mendenhall nor ABC would say how much the association paid ABC for the placement. The campaign also includes more traditional ads featuring Burrell’s character that premiered during two other ABC sitcoms Wednesday.

Burrell said there’s always some nervousness when advertising intrudes on the creative process. But he said he trusted the “Modern Family” executive producers, who signed off on the use and wrote the scenes. “Their sense of caretaking for the show is very high,” he said.

The Realtors were given the chance to review what was written before the show aired, ABC said.

Mendenhall said the Realtors were not nervous about having their message carried by a character who, while likable, is often portrayed as bumbling and clueless. The Realtors want to convey that their members are just like anyone else in a community.

“We are real people helping real individuals and providing them with a part of the American dream,” she said. “The fact that he is approachable is part of what makes him special.”

Burrell said it is clever advertising.

“I’ve always admired a company that allows themselves to be seen in an imperfect light or allows themselves to be poked fun at,” he said. “That’s the strongest play.”

The traditional ads, where Dunphy disseminates his “Phil-osophies,” is more along those lines. They will be offered online, during breaks in ABC shows and on cable networks like HGTV that feature real estate-oriented programs.