Unlike "Star Wars," "Star Trek" takes place not "a long, long time ago," but in the not-too-distant future. That has allowed the series, both on TV and on film, to reference contemporary pop culture in general — and pop music in particular — in smart and lively ways over the last half-century.
In the latest movie, "Star Trek: Beyond," for instance, 20th century music turns up when a surviving recording of Public Enemy's "Fight the Power" rumbles out of a vintage boom box aboard a centuries-old abandoned starship.
More than just a cute cultural reference, the "vintage" music is a sonic savior when Capt. Kirk and his crew need something "loud and distracting" to fend off a swarm of hostile invaders. In that crucial moment, the Beastie Boys' 1994 track "Sabotage" helps save the entire United Federation of Planets.
In fact, latter-day "Star Trek" franchise keyholder J.J. Abrams appears to be nearly as much a fan of the Beasties as the "Trek" legacy, having previously used "Sabotage" in his 2009 "Star Trek" reboot and a bit of the group's "Body Movin'" in its 2012 sequel, "Star Trek: Into Darkness."
Those nods to the New York rap trio represented a balancing of the scales: The Beastie Boys referenced "Star Trek" in their lyrics numerous times, rapping that "your fingers pop like a pinch on the neck from Mr. Spock" in 1998's "Intergalactic" and an entire Trekkie-worthy verse in "The Brouhaha" from 2004:
Communicator check one two, one two
This is Bones McCoy on a line to Sulu
Set the [B.S.] to Warp Factor One
Check your tricorder, set your phasers on stun
Fifty years ago, the original series occasionally dipped into the music that was helping shape the counterculture. Probably the most memorable scene was in the episode "The Way to Eden," in which a group of social outcasts in search of a planetary Eden stood in for the hippie culture that was blooming outside the Paramount Television studios.
In a show of solidarity for the rebels' motives, Mr. Spock whips out his 12-string Vulcan lute and sits in when the ragtag band starts a quasi-rock jam session as a distraction while carrying out their nefarious plot.
The Vulcan lute showed up in several other episodes and elsewhere, practiced decades later by another Vulcan, Lt. Commander Tuvok, in the "Star Trek: Voyager" series, although minus contemporary pop music conventions.
Spock and Kirk also weighed in on punk rock in 1986's "Star Trek IV: The Voyage Home," which was mainly set in present-day San Francisco. When a mohawked punk fan on a city bus responds to Kirk's request to turn down his stereo with a certain obscene gesture followed by cranking up the high-decibel thrasher "I Hate You," Spock calmly gives him the Vulcan neck pinch and puts him, and the offending boom box, out of commission — eliciting applause from the other bus riders.
Another instance in which rock 'n' roll Earth survived the centuries turned up in 1996 for the second "Next Generation" film, "Star Trek: First Contact." In another time-travel adventure, Capt. Picard and his crew follow a Borg spaceship to 21st century Earth, where Zefram Cochrane, inventor of the warp drive that allowed spaceships to travel faster than the speed of light, turns out to be less than the heroic pioneer he's portrayed to be in 24th century history books.
Cochrane is introduced, falling-down drunk in the bombed-out shell of a bar and deriving what appears to be his only joy in life from listening to an ancient jukebox. A la the Fonz, he pops it into service with a bop from his fist until it blasts out a rocked-up rendition of Roy Orbison's "Ooby Dooby," which is pretty much a carbon copy of the 1970 Creedence Clearwater Revival version.
The intersection of the "Star Trek" universe and pop music has gone both ways, most notably with actor William Shatner's infamous camp classic from 1968 "The Transformed Man," in which he delivered over-the-top theatrical readings of famous soliloquies and pop songs including Bob Dylan's "Mr. Tambourine Man" and the Beatles' "Lucy in the Sky With Diamonds."
Decades later Shatner teamed with indie-rock artist Ben Folds for the 2004 album "Has Been," which featured a well-received cover of the 1995 Brit-pop classic by Pulp, "Common People." His 2011 collection "Seeking Major Tom" teamed him with such acolytes as the Strokes, Yes guitarist Steve Howe and funk kingpin Bootsy Collins, and in 2013, Shatner, at 82, teamed with prog-rock heroes Rick Wakeman, Tony Kaye and Billy Sherwood for yet-another poetry-and-music marriage, "Pondering the Mystery."
Mr. Spock actor Leonard Nimoy played it a bit more conventionally with his 1968 album "Two Sides of Mr. Spock," which contained folkie renderings of "Gentle on My Mind," "If I Were a Carpenter" and "Love of the Common People" on one side and more in-character tracks such as "Highly Illogical" and "Spock Thoughts" on the other.
"To seek out new life and new civilizations" was the "Star Trek" credo from the very beginning. But periodically, the series has also revealed new ways to rock.