In mythology, folklore and speculative fiction, shapeshifting is the ability of a being or creature to transform its physical form or shape. This is usually achieved through an inherent ability of a mythological creature, divine intervention or the use of magic. The idea of shapeshifting is present in the oldest forms of totemism and shamanism, as well as the oldest extant literature and epic poems, including works such as the Epic of Gilgamesh and the Iliad, where the shapeshifting is usually induced by the act of a deity.