NEW YORK (AP) -- PepsiCo (PEP -1.79%) is pulling an online ad for Mountain Dew that was criticized for portraying racial stereotypes and making light of violence toward women.

In the 60-second spot developed by rapper Tyler, The Creator, a battered white woman on crutches is urged by an officer to identify a suspect out of a lineup of black men played by members of a music group. A goat is included in the lineup.

The goat makes threatening remarks to the woman such as "Ya better not snitch on a player" and "Keep ya mouth shut." She eventually screams and runs away.

PepsiCo apologized in a statement and said it understood how the ad could be offensive. The company says the video has been removed from all Mountain Dew channels.