The images captured by Spitzer show the nebulae (plural for nebula) IRAS 19340+2016 and IRAS19343+2026.
The nebula closest to the right shows hints of what look somewhat like the saucer and hull of the original USS Enterprise, Capt. James Kirk’s (played by William Shatner in 1966 and Chris Pine in 2009) famous spaceship.
And in the nebula closest to the left, stargazers can make out the "Next Generation’s" Enterprise-D, the ship captained by Jean-Luc Picard (played by Patrick Stewart).
"Since ancient times, people have imagined familiar objects when gazing at the heavens. There are many examples of this phenomenon, known as pareidolia, including the constellations and the well-known nebulae named Ant, Stingray and Hourglass," NASA said.
The images were created using data from Spitzer’s biggest surveys of the Milky Way.
"Fifty years after its inception, Star Trek still inspires fans and astronomers alike to boldly explore where no one has gone before," the space agency said.
This story was reported from Los Angeles.