He thought himself that if someone sang Raga Megh, it would save him. He taught his daughter Saraswati and her friend Raga Megh. He asked them to sing only after the lamps started burning.
Yes, this plan worked well. Soon as he started singing, air became hot, audience bathed in perspiration, leaves dried up and fell, river water started boiling. Suddenly flames shot up and lighted lamps. Just then the two girls started singing Raga Megh, thus, Tansen was saved.