The location of the Monastery at Petra, an ancient religious monument in what is now Petra, Jordan, was constructed based on the path of the sun during the winter solstice, researchers say.

The monastery was built by the Nabataeans, a civilization that thrived in ancient Arabia between the 1st century B.C. and the 1st century A.D., Space.com reported. Researchers now believe the Nabataeans positioned the monastery so that the sun shines directly on a deity located inside when the Earth is at the farthest position from Sun.

"The Nabataean monuments are marvelous laboratories where landscape features and the events of the sun, moon and other stars interact," Juan Antonio Belmonte, a Canaries Astrophysical Institute researcher who coordinated the findings, said in a statement obtained by Space.com

The findings were published in the journal Nexus Network. In addition to directing light on the deity, the sunlight creates the shadow of a lion's head on the rocks of a mountain opposite the monastery. Lions were sacred to the Nabataeans.

"The astronomical orientations were often part of an elaborate plan, and possibly, a mark of the astral nature of the religion, which showed incredible 'hierophanies,' or demonstrations of the sacred on monuments related to cultic times and worship," Belmonte said.

The Monastery at Petra is not the only Nabataean construction that was based on the skies. The Urn Tomb, believed to have been a royal tomb, has a primary gate that is centered with the equinox sunset, the researchers found, Space.com reported. During the summer and winter solstices, the sun's rays shine on the interior corners of structure.

Scientists believe the tomb was used to mark significant Christian dates in the summer and winter when it was converted into a church in 446 A.D., including Christmas Eve on Dec. 24, and the birth of St. John the Baptist on June 24, Space.com reported.

"This amazing set of three alignments within the plan of the tomb, in combination with significant features in the distant horizon, can hardly be ascribed to chance," Belmonte said. "We consider that it is a deliberate attempt to convert the hall of the Urn Tomb into a type of time-keeping device."