"....The demons, being enchanted by the beauty of the Mohini form, agreed to hand over the container of nectar to Mohinidevi, who tactfully delivered it to the demigods.
When the demons got possession of the container of nectar, an extraordinarily beautiful young woman appeared before them. All the demons became captivated by the young woman's beauty and became attached to Her. Now, because the demons were fighting among themselves to possess the nectar, they selected this beautiful woman as a mediator to settle their quarrel. Taking advantage of their weakness in this regard, Mohini, the incarnation of the Supreme Personality of Godhead, got the demons to promise that whatever decision She might give, they would not refuse to accept it. When the demons made this promise, the beautiful woman, Mohini-murti, had the demigods and demons sit in different lines so that She could distribute the nectar. She knew that the demons were quite unfit to drink the nectar. Therefore, by cheating them She distributed all the nectar to the demigods. When the demons saw this cheating of Mohini-murti, they remained silent. But one demon, named Rahu, dressed himself like a demigod and sat down in the line of the demigods. He sat beside the sun and the moon. When the Supreme Personality of Godhead understood how Rahu was cheating, He immediately cut off the demon's head. Rahu, however, had already tasted the nectar, and therefore although his head was severed, he remained alive. After the demigods finished drinking the nectar, the Supreme Personality of Godhead assumed His own form."
Srimad-Bhagavatam 8:9 Summary
"Rahu, the demon who causes eclipses of the sun and moon, covered himself with the dress of a demigod and thus entered the assembly of the demigods and drank nectar without being detected by anyone, even by the Supreme Personality of Godhead. The moon and the sun, however, because of permanent animosity toward Rahu, understood the situation. Thus Rahu was detected.
Purport: The Supreme Personality of Godhead, Mohini-murti, was able to bewilder all the demons, but Rahu was so clever that he was not bewildered. Rahu could understand that Mohini-murti was cheating the demons, and therefore he changed his dress, disguised himself as a demigod, and sat down in the assembly of the demigods. Here one may ask why the Supreme Personality of Godhead could not detect Rahu. The reason is that the Lord wanted to show the effects of drinking nectar. This will be revealed in the following verses. The moon and sun, however, were always alert in regard to Rahu. Thus when Rahu entered the assembly of the demigods, the moon and sun immediately detected him, and then the Supreme Personality of Godhead also became aware of him."
Bhaktivedanta Book Trust. Excerpted from texts and purports of HDG A.C. Bhaktivedanta Swami Srila Prabhupada.