In “Bumblebee,” the lovable robot in the title uses his cassette deck to express himself after losing his voice early in the film. And when he plays the ’80s power-ballad “The Touch,” he brings a happy ending to a strange journey for the song that included a baffling pit stop in Paul Thomas Anderson’s 1997 classic “Boogie Nights.”

People who were 11 years old when “Transformers: The Movie” was released in 1986 can skip ahead a few paragraphs. But for everyone else: “The Touch” is a hopeful electric-guitar-synth-and-drum-fill-driven masterpiece that could easily pass for a Sammy Hagar or Survivor single custom-written for an inspiring ’80s training montage.

When it lifted off in “Transformers: The Movie,” the lyrics seemed to be about the Autobots and their brave fight against the Decepticons.

Also Read: 'Bumblebee' Film Review: Without Michael Bay as Director, the Best 'Transformers' Yet

Here are a few of them:

You got the touch

You got the power

When all hell’s breaking loose

You’ll be riding the eye of the storm

You got the heart

You got the motion

You know that when things get too tough

You got the touch

But “The Touch” isn’t about Optimus Prime, and wasn’t even written for “Transformers: The Movie.”

As songwriter Stan Bush explained in a fantastic 2014 Vulture story by Abraham Riesman, he and co-writer Lenny Macaluso came up with “The Touch” after watching the Louis Gossett Jr. film “Iron Eagle,” a fighter-pilot film that came out in 1986, the same year as “Top Gun” and “Transformers: The Movie.”

Bush said they were inspired by a moment in the film when Gossett tells a young pilot: “Kid, you’ve got the touch.”

“We were like, ‘Yeah! What a great song idea!'” Bush told Vulture.

Their record label subsequently placed “The Touch” in “Transformers: The Movie.” Here’s what those of us who saw the film at the Del Amo Mall theater in August 1986 had stuck in our heads for the remainder of the afternoon:

Flash forward 11 years, to “Boogie Nights,” and a scene with all kinds of resonance: High-flying porn star Dirk Diggler (Mark Wahlberg) is trying to record a power ballad, badly. The scene is notable for me and probably many others for two reasons:

1. Songwriter Michael Penn, one of my all-time favorites, plays Nick, the unflappable producer struggling to get a decent take from Dirk. He also scored “Boogie Nights.”

2. The song Dirk is singing is “The Touch.”

Watch:

How did this happen? Thanks again to Vulture, which explained that Anderson “had been fascinated by ‘The Touch’ since its early days.”

Anderson’s “The Touch” fixation was almost as old as “The Touch.” When he shot the half-hour “Boogie Nights” predecessor “The Dirk Diggler Story,” his early Dirk appeared in a recording-session scene almost identical to the one that later appeared in “Boogie Nights.”

“‘Boogie Nights,’ that was all set up through the publisher,” Bush told Vulture. “It was an after-the-fact thing on my end. I just went to the theater and saw the scene. I guess it’s the old axiom about any exposure being good.”

Bush tried for years to get “The Touch” included in one of the live-action “Transformers” movies — and thought he had his chance when Mark Wahlberg joined the franchise. He also recorded a very Linkin Park-esque remake in a bid to get the song included in the Michael Bay films. Here you go:

But the film’s official reunion with “Transformers” wasn’t to be — until “Bumblebee.”

The new film was the perfect platform for a revival of “The Touch” because it is set in 1987, just a year after the song’s release. Of course, Bumblebee would play it to communicate his feelings to Charlie (Hailee Steinfeld): She’s the only one who knows how to fix him.

She’s got the touch.