Srimad Bhagavatam Canto 10, Chapter 16, Text 30

SB 10.16.30

tac-citra-tandava-virugna-phana-sahasro
raktam mukhair uru vaman nrpa bhagna-gatrah
smrtva caracara-gurum purusam puranam
narayanam tam aranam manasa jagama
 
Translation: 
 
My dear King Pariksit, Lord Krsna’s wonderful, powerful dancing trampled and broke all of Kaliya’s one thousand hoods. Then the serpent, profusely vomiting blood from his mouths, finally recognized Sri Krsna to be the eternal Personality of Godhead, the supreme master of all moving and nonmoving beings, Sri Narayana. Thus within his mind Kaliya took shelter of the Lord.
 
Purport: 
 
In Chapter Sixteen of Krsna, the Supreme Personality of Godhead, Srila Prabhupada points out that whereas previously Kaliya was vomiting poison, now his poison was exhausted and he began to vomit blood. Thus he had been cleansed of the vile contamination within his heart that had manifested as serpent’s venom. The word smrtva, “remembering,” is very significant here. The wives of Kaliya were actually serious devotees of Lord Krsna, and according to the acaryas they had often tried to convince their husband to surrender to Him. Finally, finding himself in unbearable agony, Kaliya remembered his wives’ advice and took shelter of the Lord. Srila Visvanatha Cakravarti Thakura explains that Kaliya’s archrival had traditionally been Garuda, the carrier of Visnu. But now Kaliya realized that he was fighting an opponent who was thousands of times stronger than Garuda and who therefore could be only the Supreme Personality of Godhead. Thus Kaliya took shelter of Lord Krsna.
 
Srimad Bhagavatam Canto 10, Chapter 16, Text 29
Srimad Bhagavatam Canto 10, Chapter 16, Text 31