Pepsi is the star of the newest TV spot for Arby's.

Thanks to some quick footwork by the Minneapolis ad agency Fallon, Arby's will avoid a contract breach with the soft drink giant with a 30-second shout-out to Pepsi that admits its goof-up.

In an ad set to run Sunday, Arby's uses the sonorous voice of actor Ving Rhames to make a high-profile egg-on-its-face apology.

"Arby's has an agreement to feature their good friend Pepsi in two commercials a year. Well, Arby's messed up and forgot about the second commercial. So, here it is. Pepsi … cool, refreshing and goes great with Arby's sandwiches and other Arby's foods. Arby's. We have Pepsi."

The Arby's ad, or Pepsi ad, or Arby's/Pepsi ad, is already a social media sensation with more than 500,000 YouTube views as of Thursday.

Fallon, Arby's agency of record, created the Pepsi spot on the fly after Pepsi reminded Arby's that it had satisfied only half of its contractual two-ad obligation for 2014, which can be as simple as a glass of Pepsi next to an Arby's sandwich.

With production already wrapped up with new ads for the rest of the year featuring the tagline "We have the meats," Arby's had a problem.

"Arby's came to us and said we need a way to shoe in a Pepsi," said Fallon creative director Matt Heath. "We said we want to do it a different way. We said we could shoot a Pepsi on a white background like the other Arby's spots and write a script. Arby's loved it and Pepsi gave it the green light."

The ad, which was first reported by the Wall Street Journal on Monday, quickly became an Internet hit.

"I'd like to say this was all strategic, but sometimes you get a little lucky," said Heath. "We wanted to make the most of a potentially uncomfortable situation."

David Phelps • 612-673-7269