The offending dialogue comes during an argument between Jay, played by Ed O'Neill, and his Colombian wife Gloria, played by Sofia Vergara.
"Now, maybe in Colombia ..." Jay begins.
"Ah, here we go," Gloria interrupts. "Because, in Colombia, we trip over goats and we kill people in the street. Do you know how offensive that is? Like we're Peruvians!"
Peruvian cyberspace lit up with criticism of ABC, which airs "Modern Family," and Vergara, who brushed aside a torrent of insulting tweets. After one Twitter user asked her to clarify what happened with the script, the actress responded in Spanish: "Get a life!!!!!!"
ABC did not immediately respond to calls seeking comment.
"It's incredible that in a country where everything is politically correct, ABC would have a line of this sort," said Milagros Lizarraga, founder of Peru USA Southern Ca, an online community that communicates through social media.
"Many Peruvians think this is no coincidence, that she knew what she was saying, because an actress has the power to say, 'No, I can't say this because it would hurt my image,'" Lizarraga said. "Unless she agrees with what she said."
In Peru, Beatriz Merino, head of the People's Defender's Office, said she wants an explanation and will try to talk to the U.S. ambassador about the episode.
"No country should have to be offended," Merino told broadcaster Radioprogramas.
Now in its second season, the comedy series is a breakout popular and critical hit in the United States.