NASA has marked the silver anniversary of the Hubble Space Telescope with fireworks of a celestial kind, conveyed by the orbiting observatory itself.

To commemorate Hubble's launch on April 24, 1990, NASA has released images of the Westerlund 2 cluster located about 20,000 light-years away in the constellation Carina.

"This is really an exciting week for astronomers and people who love astronomy all over the world," said Hubble scientist Jennifer Wiseman at a televised anniversary celebration at the Newseum in Washington, DC.

From its orbital perch 547 kilometres above Earth, Hubble's sharp eye can distinguish individual stars in the cluster, which is teeming with about 3,000 newborns.

With its infrared vision, Hubble also can peep inside cocoons of dust and gas where even more stars are forming.

Learning about the lifecycle of stars was one of the reasons Hubble was built.

By operating above distortions and blocking effects of Earth's atmosphere, astronomers hoped to look farther back in time, at generations of stars and galaxies that formed closer to the Big Bang, some 13.7 billion years ago.

"We never thought it would last this long," said NASA administrator and former astronaut Charlie Bolden, the pilot on the mission that launched Hubble.

Many of the telescope's most important discoveries turned out to be in areas that did not even exist when it was launched.

Hubble's observations of a particular kind of exploded star helped astronomers realise that the pace of the universe's expansion is ramping up, propelled by some unknown force referred to as "dark energy".

Sorry, this video has expired Hubble gives us a window to the distant past: Charlie Lineweaver

Hubble also has imaged a planet beyond the solar system and scanned other planets' atmospheres for telltale chemical fingerprints. The first so-called exoplanet was discovered in 1992, two years after Hubble's launch.

"Hubble has fundamentally changed our human understanding of our universe," Mr Bolden said.

NASA hopes to keep Hubble operating through 2020 to overlap with its infrared successor, the James Webb Space Telescope, due to launch in October 2018.

Reuters