BEVERLY HILLS, Calif. — Theirs was a gentle friendship forged in the cozy confines of an eco-friendly Nissan Leaf, the electric car that serves as a roving setting for bromance in the new action-comedy “Stuber.”

In the driver’s seat was Kumail Nanjiani, known for his work on “Silicon Valley” and the autobiographical romance “The Big Sick,” starring as a high-strung Uber driver named Stu who picks up the rideshare fare from hell.

Riding shotgun was wrestler-turned-actor Dave Bautista as Vic, the gruff cop who commandeers Stu’s ride when Lasik surgery leaves him blurry-eyed — moments before he gets a hot tip on the biggest case of his career.

They got to know each other last year on the Atlanta set of “Stuber,” squeezed into the cab of a tricked-out silver Leaf for hours on end. They talked about work. They talked about life.

“A lot of times people aren’t really interested enough to talk about personal stuff,” said Bautista, joining Nanjiani in a Beverly Hills hotel suite toward the tail end of a long day of promotion. “And sometimes you don’t have time to spend with people. But we had a lot of time to spend together, and a lot of times it was just us, sitting in this car.”

How close did they get? Nanjiani was delighted to learn that Bautista has a collection of vintage lunchboxes. Walls and walls filled with them. “That really captures Dave, I think. He’s kind of a kid at heart,” said Nanjiani. He urged Bautista to describe his most prized item, a “Green Hornet” lunchbox featuring Bruce Lee as Kato.

“I love it so much is because it’s got Bruce Lee on it,” said Bautista. “[It] was a big deal back then, especially to have an Asian character on television back then who was legit badass — he was somebody I grew up admiring, and someone I could connect and relate to.”

Returning the admiration, Bautista offered: “I have a lot of favorite things [about Nanjiani], but one thing that stuck in my head is that Kumail is really drawn to sad songs. I thought it was odd and beautiful at the same time.”

Nanjiani nodded, confirming that, like his costar, he’d looked to another Bruce for inspiration in his youth: Bruce Springsteen.

“In high school I would listen to all [his] sad songs,” he said, revealing how watching the documentary “Springsteen on Broadway” took him back. “I was proud of myself because I used to need these songs, and now I just like these songs. But there was a version of Kumail who really needed these songs to survive.”

The pair forged their paths to “Stuber” from the very different worlds of wrestling and comedy, respectively: Bautista grew up in San Francisco and Washington, D.C., and made his WWE debut in 2002; around the same time, the Karachi, Pakistan-born Nanjiani started doing stand-up in Chicago.

When they landed “Stuber,” they called the same mutual friend, “Guardians of the Galaxy” director James Gunn, for intel. “We both hit him up,” said Bautista. “‘What’s Kumail like?’ And James, who I trust very much, had the highest praise.”

Last April, when Bautista, 50, returned to WrestleMania 35 for a highly touted final match against Triple H before his official retirement from the ring, Nanjiani, 41, was in the front row cheering him on with his fellow Oscar-nominated “Big Sick” co-writer and wife, Emily V. Gordon.

“When we were shooting ‘Stuber,’ he’d talk about how he wanted to go back and have one more match and end his career on his own terms,” Nanjiani said with a smile. “When he texted me asking me to come, I was just so moved, because I knew how important it was to him.”

Made by Canadian director Michael Dowse (“Goon,” “What If”) from a script by Tripper Clancy, “Stuber” is a throwback buddy cop actioner that pays homage to ’80s action comedies such as “Midnight Run,” “48 Hrs.” and “Lethal Weapon.” It takes inspiration, according to Dowse, from quintessentially L.A. movies including “To Live and Die in L.A.,” “Heat,” “Training Day” and “52 Pick-Up.”

And “Stuber” adds an unexpected twist to the genre: an exploration of toxic masculinity amid the shootouts, fist fights, car chases and hijinks that ensue as Stu, desperate for a five-star rating, begrudgingly takes Vic across Los Angeles and back on the trail of the ruthless criminal (Iko Uwais) who killed his partner.

“We wanted to embrace those movies that we all loved growing up, but at the same time we didn’t want to make it in a vacuum,” said Dowse. “Those movies aren’t necessarily that politically correct or can be a little bit sexist, so in both ways we wanted to celebrate those movies but also make them a little bit more modern and take on themes without being too preachy.”

Casting the right onscreen pair was an exercise in chemistry. Where Bautista’s easily angered, no-nonsense Vic channels that kind of big ’80s macho energy, Nanjiani’s chatty Stu is averse to risk, violence and confrontation — until both men learn to meet in the middle.

“Stu is a people-pleaser,” said Nanjiani. “He’s got his code of honor when it comes to being an Uber driver, and he’s way too polite. He’s a little oppressive with his niceness.” Vic is a divorced workaholic who can’t express his emotions — not to Stu, or his boss on the force (Mira Sorvino), or the daughter he loves.

“Vic’s existence is tremendously sad,” said Nanjiani. “He’s someone who has people who love him and want to connect with him, and he doesn’t do that. I feel like he’s a guy who’s imprisoned by his own conception of masculinity and who he is … you see men like that all the time.”

Bautista agreed. “Vic thinks like his dad — he brought him up and taught him to ‘be a man,’” he said. “It’s pointed out later on that his dad was really just a dick.”

The two had not met before the film, but a chemistry test, with Nanjiani and Bautista in chairs close together to approximate Stu’s compact Uber, sealed the deal. On set their approaches were polar opposites: Nanjiani, who also did writing work on the script, likes to have dialogue down pat while Bautista prefers to go in more loosely.

“You get a feel for a person, if they get frustrated with things or how prepared they are — or how irritated they get if you’re not prepared,” said Bautista. “And I’m never prepared, so I need someone who’s patient and understands and is also supportive. I’m very big on mutual support. It’s really important to me.”

Produced by 20th Century Fox and distributed by Disney, “Stuber” is the first studio lead role for both Nanjiani, who is Pakistani American, and Bautista, who is of Filipino descent. That it marks a groundbreaking moment for Asian Americans in Hollywood, not only personal career milestones, is not lost on them.

Their characters’ backgrounds are just part of the fabric of the film, which also stars Cuban American actress Natalie Morales as Vic’s daughter, Nicole, and Indonesian actor Uwais of “The Raid” movies as his nemesis.

Inclusive casting wasn’t necessarily by design, but “it’s an important issue with me,” said Bautista, who with Nanjiani improvised one of the film’s most pointed exchanges, in which Stu misidentifies Vic as white and spends the rest of the film perplexed over Vic’s ethnicity. On his next film, STX’s “My Spy,” which he produced and stars in, Bautista made inclusion a clear priority. “It’s a personal issue with me. It is absolutely a statement,” he said.

Morales, a seasoned TV performer whose credits include “Parks and Recreation,” “Santa Clarita Diet” and “Abby’s,” echoed the sentiment. “The fact that I am Cuban has nothing to with the character; it’s just one of the many things about her,” she said. “That is how our everyday lives are. It’s woven in like it’s normal, because it is normal.”

“Stuber” satisfies certain genre expectations, letting bullets and fists fly as Stu’s Nissan Leaf zooms across the city. But its most brutal fight isn’t the one that sends Bautista careening down several flights of stairs at a downtown L.A. hotel, or blasting bad guys away left and right in a veterinary office shootout, or facing off against Uwais, who also served as fight choreographer.

It’s the intense, all-out brawl between Vic and a fed-up Stu that unfolds in the aisles of the sporting goods store where Stu also works. A fight … about fighting. Nanjiani and Bautista embraced the chance to make an action movie that dismantles toxic masculinity and encourages men to process and embrace their feelings.

“I get emotional watching commercials,” said Bautista, who showed off his dramatic range in “Blade Runner 2049.” “I wanted to do a comedy, and I’d looked at a bunch of scripts, and most of them were pretty godawful. But I connected with this one on different levels. I believe that if you can leave a theater and want to sit down and talk about the film, that’s what sets films apart. That’s why films get watched over and over.”

“It felt like that was the challenge,” added Nanjiani. “If we could take a buddy cop action comedy that’s sort of a throwback to this ’80s kind of movie and really talk about these things, if we could pull it off, then it was worth trying.”

Morales highlights the ability to listen as key to not only the chemistry of the film’s leads, but the process of making “Stuber.” “The most important part of being funny is listening,” she said. “Because when you’re actually listening to somebody and not just waiting for your turn to talk, and you have good, smart, fast instincts, is when you can be funniest.”

Bautista downplays comparisons between WWE and the kind of acting he’s focused on now. Few pro wrestlers possess the X-factor that can make a true star, he says — the ability to connect with an audience and take them on an emotional journey.

Of those ring legends (including the Undertaker, Stone Cold Steve Austin, the Rock, Triple H and Ric Flair), only one, Dwayne Johnson, has successfully transitioned into a Hollywood career. But Bautista isn’t here to follow in the Rock’s footsteps.

“I did it for my own reasons. I think he was destined to do something other than I aspire to do. I really set out to be an actor,” said Bautista, who will next reunite with “Blade Runner 2049” director Denis Villenueve on “Dune.”

If “Stuber” lands with audiences and is a success in July’s crowded frame, both hope the road leads to the sequel they’ve been riffing about. They’ve already got a title for it. “‘Stuber 2: 2Ber,’” Bautista deadpanned.

“I drive a potato in it,” said Nanjiani. “That’s the joke.”

“I think this film deserves a sequel, and I would like to see a continuation of the characters,” added Bautista, who’s lined up for Zack Snyder’s Netflix zombie flick “Army of the Dead” and the third “Guardians of the Galaxy.”

Nanjiani, meanwhile, has been working out a lot lately for undisclosed reasons, eliciting pep talks from Bautista: “Man, you’re jacked, dude!” His upcoming projects include the animated “Voyage of Doctor Dolittle,” rom-com “The Lovebirds,” opposite Issa Rae, which he executive produced, and “Little America,” an anthology series for Apple TV+.

In April, trade publications reported that he was in talks to join the cast of Marvel’s “Eternals” — which would technically place him in the MCU alongside Bautista’s cosmic superhero Drax.

“For me, [‘Stuber’] was great because it was such a different kind of thing, it just gave me confidence,” he said. “After doing it and watching the movie, I was like, ‘Oh, now, I want to do different things.’ I want to do action.”

He laughed before clarifying the sentiment. “I want to do an action thing where my character is good at the action. That’s the next thing.”