Images shared by NASA this week showcase the spooky wonders of space just ahead of the most unearthly day of the year: Halloween.

The agency posted two images to Twitter: one of a celestial phenomenon appearing to be a galactic ghoul, and one of the sun resembling a burning jack-o'-lantern.

The "ghostly apparition," as NASA described it Tuesday on Twitter, was actually an image of two galaxies colliding, taken by the Hubble Space Telescope in June.

"Each 'eye' is the bright core of a galaxy, one of which slammed into another," NASA explained on its website. "The outline of the face is a ring of young blue stars. Other clumps of new stars form a nose and mouth."

A menacing looking face was formed by a collision between two galaxies. NASA, ESA, and J. Dalcanton, B.F. Williams, and M. Durbin (University of Washington)

The head-on collision will give the galaxies a ring structure for about 100 million years, which is a rare cosmic circumstance, according to NASA. Eventually, in about 1 or 2 billion years, the two galaxies will fully merge.

But in the meantime, don't let the spooky image haunt your dreams. The galactic ghoul is about 704 million light-years away from Earth.

As for the image that resembles a menacing pumpkin head, fit only for a character from Sleepy Hollow, it was originally taken in 2014 by the Solar Dynamics Observatory and re-shared on Twitter Monday. The sun's active regions are lit up as markers of an intense and complex set of magnetic fields hovering in the sun’s atmosphere, NASA said.

"This image blends together two sets of wavelengths at 171 and 193 angstroms, typically colorized in gold and yellow, to create a particularly Halloween-like appearance," NASA said on its site.