Charlie Sobeck always believed in other worlds. The NASA engineer grew up watching the Star Trek series, imagining what it would be like to follow the starship Enterprise across the cosmos to explore planets orbiting other suns.

But with the very first transmissions from the Kepler space telescope, NASA's staggeringly successful exoplanet-seeking mission, Sobeck's belief was transformed into something even more powerful: knowledge. What had once seemed true only on television, in stargazers' imaginations, and in the hypothesis of theoreticians, was now a scientific fact. We live in a universe teeming with more planets than stars.

"It hit me like a sledgehammer," recalled Sobeck, project system engineer for the mission at NASA's Ames Research Center. "Kepler showed me there really are planets out there of all different kinds. That knowledge is so different from belief."

In nine years in orbit, Kepler has confirmed the existence of 2,681 exoplanets by tracking the shadows they cast as they pass in front of their stars. Scientists are in the midst of checking out an additional 2,899 candidates. No one can say how many worlds remain to be found in the reams of data beamed back to NASA in the spacecraft's final communication this month.

But now the astronomy community must bid good night to the powerhouse planet hunter. NASA announced Tuesday that the spacecraft has run out of the hydrazine fuel that allows it to collect data and deliver it to Earth. Sometime in the next two weeks, Sobeck will send his final command to Kepler, triggering a 12-step sequence that will turn off fault protection, shut down the transmitters and put the spacecraft quietly to sleep.

Alone in the dark, it will continue to drift in a wide, Earth-trailing orbit around the sun for untold years to come, until the sun expands into a red dwarf and consumes the inner solar system, or some other cosmic phenomenon intervenes.

"It was the little spacecraft that could," said Jessie Dotson, project scientist for the mission. "It always did everything we asked of it, and sometimes more."

But Kepler's success was not always so assured.

Earlier exoplanets had generally been discovered by detecting the faint "wobble" of a star that is being tugged on by an orbiting planet's gravity. But that technique is most likely to find the kinds of planets that are least likely to host life: gas giants with a powerful gravitational pull known as "hot Jupiters."

Bill Borucki, Kepler's longtime principal investigator, wanted to launch a highly sensitive space telescope that would stare at thousands of stars in the hope of detecting the faint dimming of their light caused by a planet passing in front of them. This technique, called transit photometry, would dramatically boost the pace and sensitivity of the exoplanet search, and it would allow scientists to finally figure out whether the cosmos contained other small, rocky worlds like our own.

Although NASA agreed that the search for Earth-sized planets around sun-like stars was an important one, Boruki's initial proposals for the mission were rejected because there was no proof that the science could be done in the manner proposed. It took five proposals and almost a decade for Kepler to finally launch.

Borucki recalled the first image ever beamed back by the telescope: a snapshot of Kepler's entire field of view, taken in every wavelength of light it could detect.

"Thousands and thousands of stars," Borucki said. "It was just mind-boggling to see."

Among those stars, Kepler eventually revealed, lurked worlds of every conceivable shape and size. Bodies so huge they were barely distinguishable from small stars. Small, rocky planets that orbited so quickly their surfaces were molten. A world of gas, rock and ice with not one but two suns - like Luke Skywalker's Tatooine. Though Kepler set off in search of planets like our own, most of the systems it discovered were unlike anything scientists had dreamed of.

"That's one thing I love about the Kepler results," Dotson said. "Imagination is not the limit here."

By the end of the spacecraft's prime mission, astronomers using Kepler data concluded that our galaxy contains a planet for every sun - meaning there are as many as 400 billion exoplanets in the Milky Way alone. Several of those planets even had solid surfaces and received the right amount of sunlight to harbor liquid water - making them candidates in the search for life.

But then disaster struck. In May 2013, a second of Kepler's four reaction wheels failed, and the spacecraft was no longer able to keep itself pointed at a target. Engineers' efforts to restore one of the wheels failed.

So they improvised a solution: orient Kepler with respect to the sun so that the faint pressure of its light provides the stability needed to balance the spacecraft. Under this new configuration, called "K2," Kepler was able to scan an even wider patch of sky and found evidence for thousands more planets around distant stars.

One of Borucki's favorite discoveries came during this extended mission. In 2015, astronomers reported spotting five small, rocky planets orbiting a star that was 11.2 billion years old. The system, Kepler-444, was more than twice as old as our own solar system and more ancient than any other collection of planets in the known universe.

"If life had been developing over the billions of years before Earth was formed," Borucki said, "there may be some very interesting life-forms."

NASA knew at the start of this year that Kepler was about to scrape the bottom of its fuel tank. This spring, it launched the space telescope's successor, the Transiting Exoplanet Survey Satellite, which is predicted to find as many as 10,000 exoplanets around the stars closest to our sun.

"Kepler just kind of cracked open our typical expectations," said TESS project scientist Padi Boyd. "Now we're poised to take the next steps to bring Kepler's exoplanet discoveries closer to home."