The twin gods Hunahpú and Xbalanqúe were heroes in the mythology of the Maya, a people of central America. Through bravery and quick thinking, they outwitted the lords of Xibalba, the underworld, and destroyed them. Their story is told in the sacred Mayan text, the Popol Vuh.
According to legend, the twins' father, Hun-Hunahpú, had also struggled with the gods of the underworld. The gods challenged him and his own twin brother to play a game of ball. Then they killed him and hung his head on a tree. A young woman passing by reached up to pick some fruit from the tree, and the head spat into her hand, saying "In my saliva and spittle I have given you my descendants." She soon gave birth to twin boys, Hunahpú and Xbalanqúe.
When the two brothers met the lords of Xibalba, the gods sent them through a series of frightening places in the underworld. They began in the House of Gloom and then passed into the House of Knives, where they managed to avoid being stabbed. They built a fire in the House of Cold to avoid freezing and then faced the House of Jaguars, where they fed bones to the animals to escape being eaten themselves. After the next trial, the House of Fire, they entered the House of Bats, where disaster struck. One of the bats cut off Hunahpú's head. The gods hung the head up in a ball court and challenged the twins to play ball with them.
Xbalanqúe found a turtle to sit on Hunahpú's shoulders in place of his head, and they strode onto the ball court. During the game, the gods became distracted by a rabbit near the court. Xbalanqúe seized this opportunity to steal his brother's head from the wall and put it back in place. Much to the annoyance of the gods, the twins were now strong enough to tie the game.
Hunahpú and Xbalanqúe performed a series of tricks, during which they appeared to die in a stone oven and then transform themselves into traveling actors. When the lords of Xibalba asked the twins to perform for them, the two brothers refused at first. Eventually, they presented several acts, such as burning down and restoring a house and sacrificing Hunahpú and bringing him back to life. Impressed, the gods asked the twins to do the same for them. The brothers agreed, but after sacrificing the gods, they did not revive them. Having eliminated the gods of the underworld and avenged the murder of their father, Hunahpú and Xbalanqúe went into the heavens, where in some versions they became the sun and the moon.