Endeavour is photographed docked at the International Space Station

NASA's shuttle Endeavour may be nearing the end of its final spaceflight, but not before astronauts snapped amazing photos of the spaceship soaring over a nighttime Earth.

The images, which NASA released this week, show Endeavour still docked at the International Space Station with Earth far below as twilight sweeps over the planet. Endeavour departed the space station late Sunday night and is due to return to Earth in the wee hours of Wednesday.

"It's pretty spectacular, the view of the planet from orbit," Endeavour commander Mark Kelly told reporters late Monday. "It's something you never forget."

In one photo, the sheer speed of Endeavour and the space station as they soar orbit Earth at nearly 17,500 mph (28,200 kph) is apparent. [See photos of Endeavour over Earth at night]

The image shows Endeavour, its cargo bay flooded with bright white light, against a starry backdrop while the nighttime Earth streaks by below. City lights and the last vestiges of daylight reflecting off the atmosphere lend an eerie glow to the scene.

Another image shows Endeavour with an even darker Earth. The only hint of light is a thin, glowing curve: Earth's horizon lit by reflected sunlight.

Both photos were snapped by the space station's Expedition 28 crew as Endeavour's six-astronaut crew prepared to leave the orbiting lab.

Endeavour launched toward the International Space Station on May 16 and spend nearly two weeks linked to the outpost to deliver a $2 billion astrophysics experiment and other supplies. Four spacewalks — the last spacewalks ever by shuttle astronauts — were performed.

This mission, STS-134, is Endeavour's 25th and final flight before being retired along with the rest of NASA's shuttle fleet later this year. The shuttles are being retired after 30 years of service to make way for a new space exploration program that includes eventual deep space missions to an astronaut by 2025.

Endeavour will land at 2:35 a.m. EDT (0635 GMT) on Wednesday at NASA's Kennedy Space Center in Florida to end its final mission, then be prepared for public display at a California museum.

Photo: NASA

This article was reprinted with permission from SPACE.com.

Related on SPACE.com: