By analyzing the extraordinarily strong gravitational pull of the giant black hole at the center of the Milky Way on a star near it, astronomers have shown that Einstein's ideas about space and time still hold true as the best description yet of how gravity works.

According to Einstein's theory of general relativity, gravity results from how mass warps space and time. The greater an object's mass, the stronger its gravitational pull.

Scientists have largely tested general relativity's predictions in relatively weak gravitational fields, such as those on Earth and in the solar system. In the presence of much stronger gravitational fields — such as those of the supermassive black holes thought to lurk in the hearts of virtually all large galaxies — researchers might discover violations of general relativity that could lead to new theories that might help explain cosmic mysteries such as dark matter and dark energy.

"Einstein's right, at least for now," said Andrea Ghez, a co-lead author of the research and astronomy professor at the University of California Los Angeles, in a statement. "Our observations are consistent with Einstein’s theory of general relativity. However, his theory is definitely showing vulnerability. It cannot fully explain gravity inside a black hole, and at some point we will need to move beyond Einstein's theory to a more comprehensive theory of gravity that explains what a black hole is."

Related: Images: Black Holes of the Universe

In the new study, astronomers investigated the supermassive black hole Sagittarius A*, often abbreviated Sgr A*. This giant, located in the Milky Way's core, is about 4 million times the mass of the sun and about 14.6 million miles (23.6 million kilometers) in diameter.

The scientists monitored the star S0-2 in 2018, when it made its closest approach to Sagittarius A* during its 16-year orbit. The star got as close as 120 astronomical units (AU) from the black hole — an AU is the average distance between Earth and the sun, about 93 million miles (150 million kilometers) — traveling as fast as 2.7% the speed of light.

Using the Keck Observatory, Gemini Observatory and Subaru Telescope in Hawaii, the astronomers managed to track S0-2's complete orbit in 3D. They combined these data with measurements they have made over the past 24 years.

The researchers investigated a prediction of general relativity known as "gravitational redshift," wherein gravity can distort light. Much as how an ambulance siren sounds higher-pitched to people as the vehicle drives toward them and lower-pitched as it moves away, light falling toward a gravitational field gets shifted to the blue end of the spectrum, while light escaping from a gravitational field is reddened, or redshifted.

"These measurements signal the start of an era of where we can finally test the nature of gravity using the orbits of stars around the supermassive black hole at the center of our galaxy," study lead author Tuan Do, an astrophysicist at the University of California Los Angeles, told Space.com.

"This has been long anticipated theoretically, but it is really exciting that we can finally do it," Do added."This is a milestone on the path to future, more powerful tests of general relativity and other theories of gravity."

Image of the orbits of stars around the supermassive black hole at the center of our galaxy. Highlighted is the orbit of S0-2, the first star that has enough measurements to test Einstein's theory of general relativity around a supermassive black hole. Keck / UCLA Galactic Center Group

The spectrum of light detected from S0-2 revealed the redshifting it experienced from Sagittarius A*'s extreme gravity was consistent with general relativity. It was "amazing" to see the predictions of the theory of general relativity "work even though black holes, much less supermassive black holes, were not even known when Einstein created his theory," Do said.

This research on S0-2 is the first of many investigations of general relativity the scientists plan to conduct on stars near Sagittarius A*. One such target is S0-102, which has the shortest orbit among the more than 3,000 stars near the supermassive black hole, taking 11.5 years to circle it.

The scientists detailed their findings online today (July 25) in the journal Science.

Follow Charles Q. Choi on Twitter @cqchoi. Follow us on Twitter @Spacedotcomand on Facebook.

Follow NBC News MACH on Twitter and Facebook and Instagram.