In a later version of the myth, Vritra was created by Tvashtri to get revenge for Indra's murder of his son, Trisiras. Vritra won the battle and swallowed Indra, but the other gods forced him to vomit Indra out. The battle continued and Indra fled. Vishnu and the rishis brokered a truce, and Indra swore he would not attack Vritra with anything made of metal, wood or stone, nor anything that was dry or wet, or during the day or the night. Indra used the foam from the waves of the ocean to kill him at twilight.
In other versions, Vritra was killed by Sarasvati.