Episode Star Trek: Deep Space Nine S4E08 · 2371

Little Green Men

Little Green Men
Image: TMDB

Quark, Rom and Nog end up in 1947 Roswell.

Quark's cousin Gaila gives him a ship, which Quark uses to take Nog to Starfleet Academy, along with Rom, while secretly smuggling kemocite. When the ship cannot leave warp, Rom uses the kemocite to fix it, but this throws them back in time to Roswell in 1947, where they crash and are taken by the US Army.
Quark sees a chance to sell technology and change history, but Odo, who had stowed away, insists they preserve the timeline. With the help of a nurse and her fiancé, the Ferengi and Odo escape, and Rom uses the remaining kemocite and the energy of an atomic bomb test to send them back to their own time.