Star light, star bright, how far you look tonight.

Astronomers announced on Wednesday the discovery of the farthest and oldest star ever seen, a dot of light that shined 12.9 billion years ago, or just 900 million years after the Big Bang that gave birth to the universe.

That means the light from the star traveled 12.9 billion light-years to reach Earth.

The finding was part of efforts using the Hubble Space Telescope to search for some of the universe’s farthest and earliest galaxies. By a lucky coincidence, the astronomers were able to discern a single star system within one of those galaxies.

“It was an unexpected surprise to find something so small,” said Brian Welch, a graduate student at Johns Hopkins University in Baltimore who is an author of a paper published Wednesday in the journal Nature that describes the discovery.

Usually, objects that far away are much too dim to be seen. But Einstein’s theory of general relativity, which describes how gravity bends space, offers a handy workaround. A massive galaxy cluster fairly close to us can act as a lens to amplify light from much more distant stars and galaxies behind it.

A survey using the Hubble Space Telescope has been examining 41 galaxy clusters. “When you look at a bunch of really massive galaxy clusters, there’s a good chance that you can find some really highly magnified objects behind them,” Mr. Welch said.

The galaxy cluster typically magnifies the brightness of the object behind it by up to a factor of 10, Mr. Welch said.

The light is not magnified evenly, however. Ripples in space-time can create bright spots, much like ripples on the surface of a swimming pool create patterns of bright spots at the bottom of the pool. In examining one of the magnified distant galaxies, the astronomers found that a point of light lined up with one of the ripples, and its shine was magnified by a thousandfold or more.

“The galaxy is sort of stretched out into this long crescent-shaped arc,” Mr. Welch said. “And then the star is just one component of that.”

Because the universe is expanding, more distant objects are moving away faster. That shifts the frequency of light toward longer wavelengths. The star spotted by Mr. Welch and his colleagues possesses what astronomers call a red shift of 6.2, far higher than the previous record-holder for most distant single star. That star, reported in 2018, had a red shift of 1.5, corresponding to when the universe was about four billion years old.

The researchers nicknamed the new star Earendel — Old English for “morning star.” If it is a single star, the astronomers estimate that it is a big one — some 50 times the mass of our sun. It could also be a system of two or more stars.

The alignment of Earendel and the galaxy cluster will persist for years, so Earendel will be one of the targets during the first year of observations by the newly launched James Webb Space Telescope, which has a larger mirror than Hubble and gathers light at the longer infrared wavelengths.

The Webb observations will be able to measure the brightness across a spectrum of wavelengths. That will help astronomers determine the star’s temperature. “We really need that spectrum to say with sort of absolute certainty that this is a star as opposed to some other sort of object,” Mr. Welch said.

Mr. Welch said subsequent, more detailed observations by Webb could identify the composition of Earendel. The Big Bang produced only the lightest elements, like hydrogen and helium. The earliest stars are thus expected to contain lower concentrations of heavier elements, which are created by fusion reactions within stars and in the explosions of dying stars. The current hypothesis is that with fewer of the heavier elements, more of the early stars should have been big and bright.

“It looks like it’s pretty hot and pretty massive,” Steven Finkelstein, an astronomer at the University of Texas at Austin who was not involved with the research, said of Earendel.

Yet just this one star would not be enough to prove the case of bigger stars in the early universe. “But it certainly supports that,” Dr. Finkelstein said. “If you start to build up a large number, and many of them look to be pretty massive, then the evidence would get stronger and stronger that more massive stars are the norm in the distant universe.”

The Webb telescope should also be able to find other distant magnified stars like Earendel, although how many are fortuitously lined up with a gravitational lens remains to be seen. It might even be able to spot some of the stars at a red shift between 10 and 20, corresponding to a period between 100 million and 500 million years after the Big Bang.

“Which is right in that window when we think the first stars are forming,” Dr. Finkelstein said.