Originating from Tupi culture, Boitatá is one of the best-known characters in Brazilian folklore. In Brazil's contemporary history, it is generally in preschool that we first learn the legend of a good little snake that turns into fire to protect forests and rivers from hunters and evil men. However, the legend, or the "figure," of Boitatá, was recorded by a chronicler in sixteenth-century historical sources only once, in a few sentences.
It is thanks to Father Anchieta that we have proof of how snakes were perceived and feared in Tupi mythology. In a letter from São Vicente dated 1560, he reports on a Tupi entity that claims to be Mbaé (thing) Tatá (fire), "thing of fire", "that which is all fire". The "baetatá" occurred "máxime nas praias" mainly on the beaches, because these beings "live for the most part near the sea and rivers" and of it "nothing else is seen but a glimmering torch running here and there". According to Anchieta, the thing of fire "swiftly attacks the Indians and kills them, like the curupiras, though what it truly is remains unknown for certain".
O Curupira, outra lenda indígena. Manuel Santiago, 1926. Wikimedia Commons
With this account, we can gather that the "baetatá" were entities the Tupi feared, since the "baetatá" could even kill without any apparent reason. According to this single record, "all fire" was not exactly a snake, but a trail of light.
Representação do Boitatá. O homem na canoa teme pelo fogo que se espalha. Fonte: Liber Proeliis
In 1566, during the battles for the conquest and defense of Guanabara, a massive ambush of Tupinambá canoes became known for being aborted after all the gunpowder was accidentally burned on one of the Portuguese boats. The Tupinambás were impressed by the blaze of fire produced and retreated from an attack that would have been victorious given the disproportion of the contingents in combat. A fearsome sign of “baetatá” saved the Portuguese from the massacre.
Later, in the 20th century, historian Luís da Câmara Cascudo concluded that the legends of the boitatá and the "thing of fire" might be associated with what was then the unexplainable natural phenomenon known as "will-o'-the-wisp." This is the natural combustion of decomposing organic matter which, upon accumulating methane and phosphine, ignites spontaneously in the air upon contact with oxygen, causing the gases to burn. It is a flash of light and fire that can be seen at sea, in rivers, mangroves, and places with large amounts of buried organic matter, such as landfills and cemeteries.
Representação gráfica e associada à mitologia do que seriam os “fogos-fátuos” em um pântano. Fonte: site Seres Mitológicos
For those close to the phenomenon, the instinctive reaction is to run, but the displacement of air ends up pulling the flame closer, giving the perception that the "spirit," the ghost, or the Boitatá is chasing the person. It's possible to actually die of fright, after all, even though it may have a scientific explanation, we'll always see a Boitatá behind us.