NEW YORK — PepsiCo is once again learning the risks of celebrity partnerships after an ad for Mountain Dew was criticized for portraying racial stereotypes and making light of violence toward women.

The soda and snack-food company said it immediately pulled the 60-second spot after learning that people found it offensive. The ad was part of a series developed by African-American rapper Tyler, The Creator, and depicted a battered white woman on crutches being urged to identify a suspect out of a lineup of black men.

A goat character known as Felicia is included in the lineup and makes threatening comments to the woman, such as “Ya better not snitch on a playa” and “Keep ya mouth shut.”

The woman eventually screams “I can’t do this, no, no, no!” and runs away. The word “do” is in apparent reference to the soft drink’s “Dew It” slogan.

Mountain Dew, known for its neon color and high caffeine content, is generally marketed to younger men and sometimes attempts to have edgier ads.

But the controversy over its latest spot illustrates the fine line that companies must walk when trying to be hip.

AirPods have become a rare public misstep for Apple. In September, Apple marketing chief Phil Schiller hailed the earbuds as the entree to a wireless future, with seamless connection to an iPhone and a five-hour battery life.

The brokerage industry’s self-regulator has asked employees fired by Wells Fargo & Co. and stripped of their securities registrations to come forward if they have concerns over their treatment, the latest sign of growing scrutiny on the bank.

Ford Motor Co. is going ahead with plans to move small-car production from the U.S. to Mexico despite President-elect Donald Trump’s recent threats to impose tariffs on companies that move work abroad.