The US space agency has announced that the Kepler space telescope has run out of fuel and is being retired, having helped discover 2,600 planets, some of which may hold life.

The unmanned space telescope, which launched in 2009, revealed that there are billions of hidden planets in space and revolutionised humanity's understanding of the universe.

Kepler helped astronomers find potential planets by glimpsing moments when planets passed in front of their stars.

It used a detection method called transit photometry, which looked for periodic, repetitive dips in the visible light of stars caused by planets passing, or transiting, in front of them.

Kepler showed that "20 to 50% of the stars visible in the night sky are likely to have small, possibly rocky, planets similar in size to Earth, and located within the habitable zone of their parent stars," NASA said in a statement.

"That means they're located at distances from their parent stars where liquid water - a vital ingredient to life as we know it - might pool on the planet surface."

The Kepler telescope discovered more than 2,600 of the roughly 3,800 exoplanets - the term for planets outside our solar system - that have been documented in the past two decades.

Kepler's data also provided a new way to assess whether a planet had a solid surface, such as Earth and Mars, or is gaseous, such as Jupiter and Saturn. The distinction helped scientists zero in on potential Earth-like planets and better the odds for finding life.

The telescope even helped pinpoint the first moon known outside our solar system.

Kepler's demise was "not unexpected and this marks the end of spacecraft operations," said Paul Hertz, astrophysics division director at NASA, on a conference call with reporters.

Signals that fuel was nearly out were seen two weeks ago and scientists were able to get all the data from Kepler down to Earth before it completely ran dry.

NASA said it has decided to retire the spacecraft "within its current, safe orbit, away from Earth".

NASA's retired principal investigator for the Kepler mission, Bill Borucki, described it as an "enormous success".

"Basically, Kepler opened the gate for mankind's exploration of the cosmos. We have shown that there are more planets than stars in our galaxy," he said.

Kepler was succeeded by NASA's Transiting Exoplanet Survey Satellite, or TESS, which was launched in April. TESS is on a two-year, $337 million mission.