Among its finds were a planet nicknamed Tatooine, after the “Star Wars” planet with two suns, otherwise known as Kepler 16b, the first one found that orbits two stars at once. Another was the so-called Styrofoam planet, which is again half as large as Jupiter but so puffed up by the heat of its star that it is only one-tenth as dense.

Image A photograph taken by the Kepler telescope in 2009 showed a 100-square-degree patch of sky in the Milky Way galaxy. Credit... NASA, JPL Caltech, via Associated Press

The closest Kepler has come to finding another Earth was in April, when the team discovered a pair of planets about half again as big as the Earth orbiting a yellow star, now known as Kepler 62, that is 1,200 light years away. Both planets reside in the “Goldilocks” zone where temperatures should be lukewarm and suitable for liquid water and thus life as we imagine it.

By then, however, Kepler was already in trouble.

In order to do its job of precisely monitoring starlight, Kepler has to keep pointing accurately enough so that each star in the field of view stays on the same pixel in the detector, equivalent to pinpointing a soccer ball in Central Park as seen from San Francisco.

Kepler was launched with four reaction wheels, essentially gyroscopes, of which three are needed to keep it pointed. Last summer, one wheel showed signs of too much friction and was shut down. A second wheel failed in May, putting the spacecraft into safe mode and jeopardizing the exoplanet search.

Astronomers began to sing dirges. Geoffrey W. Marcy of the University of California, Berkeley, dashed off a poem, which said, in part, “Let jet airplanes circle at night overhead/ Sky-writing over Cygnus: Kepler is dead.”

NASA engineers spent several months trying to resurrect Kepler’s pointing ability. “We had very little hope it was actually going to be recoverable,” said Charles Sobeck, a Kepler deputy project manager, who compared the problem to a stuck wheel on a supermarket shopping cart.

They managed to get both faulty reaction wheels spinning again, but with too much friction. Last week, when they tried to make the spacecraft point, it went into safe mode after a few hours, making it clear that Kepler’s planet-hunting days were over.