As the “Transformers” civil war between the good-guy Autobots and the evil Decepticons for the distant planet Cybertron continues, this origin story, set in the late 1980s, reveals how Bumblebee came to Earth and befriended a troubled teenage girl.

Still mourning the death of her mechanic father, feisty 18-year-old Charlie Watson (Hailee Steinfeld), who loves repairing automobiles, yearns for a car of her own.

Spying a faded yellow, 1967 Volkswagen Beetle in a San Francisco Bay-area junkyard, Charlie brings it home, determined to restore it.

While she’s tinkering, the Beetle suddenly morphs into an enormous alien robot. Terrified at first, “gearhead” Charlie soon realizes she has a new, badass buddy and, together, they enthusiastically indulge in merry mischief.

But then nefarious Decepticons Shatter and Dropkick (voiced by Angela Bassett and Justin Theroux) arrive, convincing the gullible U.S. military that they’re peaceful visitors, searching for a dangerous, intergalactic traitor.

Yet not everyone is fooled. As suspicious Sector 7 Agent Jack Burns (John Cena) notes, “They’re called Decepticons!”

For those unfamiliar with the backstory, Autobot leader Optimus Prime (voiced by Peter Cullen) dispatched warrior B-127 (voiced by Dylan O’Brien) on a scouting mission so that, in the future, other Autobots can relocate and protect Earth.

But a fiery crash-landing and a losing battle with Decepticon Blitzwing (voiced by David Sobolov) quickly sends severely damaged B-127 into hiding — until Charlie finds him and dubs him Bumblebee. Their relationship becomes quite endearing.

Working from a coherent, coming-of-age, Spielbergian script by Christina Hodson (“Unforgettable”), animator-turned-director Travis Knight (“Tito and the Two Strings”) and his VFX team recapture the inventiveness of Michael Bay’s 2007 action franchise original, adding sentiment and style.

And for those who associate Bumblebee with the more muscular Chevrolet Camaro — just wait!

On the Granger Movie Gauge of 1 to 10, “Bumblebee” is a bittersweet 7. It’s sci-fi with a heart.