Srimad Bhagavatam Canto 06, Chapter 13, Text 16

SB 6.13.16

tavat trinakam nahusah sasasa
 vidya-tapo-yoga-balanubhavah
sa sampad-aisvarya-madandha-buddhir
 nitas tirascam gatim indra-patnya
 
Translation by His Divine Grace A. C. Bhaktivedanta Swami Srila Prabhupada: 
 
As long as King Indra lived in the water, wrapped in the stem of the lotus, Nahusa was equipped with the ability to rule the heavenly kingdom, due to his knowledge, austerity and mystic power. Nahusa, however, blinded and maddened by power and opulence, made undesirable proposals to Indra’s wife with a desire to enjoy her. Thus Nahusa was cursed by a brahmana and later became a snake.
Srimad Bhagavatam Canto 06, Chapter 13, Text 15
Srimad Bhagavatam Canto 06, Chapter 13, Text 17