According to the Rig Veda, Vritra kept the waters of the world captive until he was killed by Indra, who destroyed all the 99 fortresses of Vritra (although the fortresses are sometimes attributed to Sambara) before liberating the imprisoned rivers.
see also