In the Twelve Labors of Hercules, Hercules temporarily carried the sky while Atlas fetched the golden apples.
For the eleventh labor, Hercules needed to obtain the golden apples from the Garden of the Hesperides. Atlas, who was associated with the garden and its guardians, knew where the apples were. Hercules offered to hold Atlas’s cosmic burden while Atlas went to collect them.
In the best-known version, Atlas returned with the apples but tried to leave Hercules holding the sky permanently. Hercules cleverly asked Atlas to take the burden back briefly so he could adjust his position and make it more comfortable. Once Atlas resumed the load, Hercules picked up the apples and departed.
Modern art often depicts Atlas carrying the Earth, but the older myth generally describes him holding up the heavens or celestial sphere. The association with the Earth became especially influential in later artistic and popular representations.