Astronomers have discovered three Earth-sized planets orbiting a small red sun, just 40 light-years away.

Researchers say all three worlds are potentially habitable and could represent the best targets yet in the search for life beyond the solar system.

“These are not massive, hot, super exotic worlds,” said Julien de Wit, a postdoctoral associate in planetary science at MIT who worked on the study, published Monday in the journal Nature.

“All three of them are close to one Earth (radius), and each of them could be suitable for life,” De Wit said.

The system’s host star, called TRAPPIST-1, is what is known as an ultracool dwarf. It is about one-tenth the size of our sun and just a bit bigger than Jupiter.

Its two innermost planets orbit extremely close to the star, taking just 1.5 and 2.4 Earth days, respectively, to complete a turn around the ultracool dwarf.

The third planet’s orbital period is less certain: Current observations suggest its orbital period could range anywhere from 4 to 73 days.

The star is just .05 percent as bright as our sun, but scientists say it could still give off enough radiation to warm all three planets such that liquid water could exist on their surfaces.

A planet that is neither too hot nor too cold to sustain liquid water on its surface is generally considered to have the potential for life.

Ultracool dwarfs make up about 15 percent of the astronomical objects in our immediate neighborhood, but until now, no one had ever discovered a planet orbiting one.

That’s probably because no one was looking, De Wit said. Most exoplanet searches, like those involving NASA’s Kepler telescope, target hotter, bigger stars.

For a while, there was some debate in the astronomy community about whether it was possible for planets to form around such tiny and dim stars.

“The team took a big risk even looking for planets around these stars,” De Wit said. “But it has really paid off.”