Officially, Mazda is the automotive partner for Paramount Pictures’ “Star Trek Into Darkness.” But Audi is also running with the pop culture appeal of the sci-fi franchise, creating a potentially confusing situation for consumers.

A YouTube video produced by the German automaker stars Zachary Quinto and Leonard Nimoy, who both play Spock in the film franchise, as they race each other to a country club. Quinto, driving an Audi S7 sedan, makes fun of Nimoy and his Mercedes-Benz CLS 550 along the way.

It’s a comical short that runs 2 minutes and 44 seconds, with Nimoy even singing the “Ballad of Bilbo Baggins,” a bizarre oddity from the 1960s that Nimoy performed and has generated a cult following online over the years.

But it also created an awkward situation for both Paramount and Mazda.

It’s rare for one brand to step onto the promotional turf of another when it comes to movie marketing. There have been instances where official sponsors of the Sundance Film Festival, for example, were irked when other brands in the same category also showed up to target celebrities and filmmakers. And there’s still the infamous case of Papa John’s airing an ad during NBC’s “The Apprentice” right after a challenge had contestants develop a pizza with similar toppings for Domino’s Pizza.

Mazda has been touting its tie-in with a significant marketing campaign that involves a 30-second TV and YouTube spot, a social media push on Facebook and Twitter, print ads in magazines and posters at dealerships for the film, out May 16.

It’s the kind of marketing muscle most studios look for from brands when lining up partners to help hype their films to moviegoers in non-traditional areas.

And for the Japanese automaker, “Star Trek Into Darkness” is the kind of buzzed about pic that enables it to promote its new Mazda 6 sedan and SkyActive technology. The brand’s vehicles do not appear in the film.

But Audi’s short has generated over 2 million views since it was posted online May 6, according to YouTube, which featured the video on its homepage. Early Wednesday, it was the most shared YouTube video in 20 regions of the country.

And as an added zing to Mazda, Audi ends its video with a shot of its self-driving car, promoting its own futuristic technology, that impresses the two Spocks on screen.

There’s nothing really Mazda or Paramount, which previously worked with Audi on the “Iron Man” franchise, can do.

In the short, written by Paul Downs and Lucia Aniello, Quinto and Nimoy are not in character as “Star Trek’s” Vulcan. They’re just hired actors being themselves. But the nods to the sci-fi franchise are unavoidable, especially with certain pieces of dialog and action referring to their pointy eared character.

Audi sees the two Spocks video as the latest comedy short in a series that has previously featured Parker Posey, Joel McHale and Melissa McCarthy, and were released around the Emmys, given the German automaker’s sponsorship deal with the Academy of Television Arts and Sciences.

“We make them to be entertaining,” according to the shorts’ executive producer Joseph Assad, at PMK BNC, which reps Audi.

But in recruiting the two actors known for their iconic roles, Audi said it needed to be careful with its latest installment.

“The fans these guys bring to the table are extremely passionate and if it hits the wrong note, it can get dangerous,” Assad said. “We have two passionate fanbases: Audi and automotive enthusiasts and extreme fans of these actors and the character. If you do it wrong, you’ll get banged around.”

The short was never produced to intentionally upstage Mazda’s marketing efforts around “Star Trek,”

In fact, the production was careful not to mention “Star Trek” by name and denied Nimoy’s request to wear a “Star Trek” jacket during the shoot, which took place late last year, according to Assad.

“At the time (the short was produced) we weren’t even aware of an automotive sponsor,” Assad said. But “we were careful not to cross any lines,” in case there would be. “We were very conscious. At no point do we even mention the franchise at all.”

Still the timing of its release is clearly meant to capitalize on the buzz around the sci-fi sequel.

And it’s paying off for Audi.

“It’s exceeded even our own expectations,” Assad said.

It will also boost awareness for Paramount and its “Star Trek” sequel as more people watch the video.

Still Audi’s success this week may have reminded studio marketers that when it comes to promotional partnerships, they may want to add a new clause into actors’ contracts: No appearances in a rival brand’s projects that even remotely resemble another’s campaign around your film.

Paramount declined to comment and Mazda did not respond to requests.