As Ravana traveled with the Atmalinga in the Pushpak Vimana, Lord Vishnu created the illusion of dusk. The pious Ravana stopped at Gokarna to perform his evening prayer. However, he couldn't pray with the Atmalinga in his hands. Fortunately, he saw a lad there grazing his sheep.
"Shepherd boy!" exclaimed Ravana. "I am Ravana, the king of Lanka. Will you hold this Atmalinga for me while I go to the riverbank and offer my evening prayer?"
"Sorry, I was just going home," replied the young shepherd.
"I promise I won't be long."
"Okay, then."
Ravana handed the Atmalinga to the shepherd and warned him, "Do not place the Atmalinga on the ground under any circumstances."
"I will do as you say," said the boy, "but only on one condition. If I feel the Atmalinga is too heavy, I will call your name three times. If you aren't back by then, I will put it on the ground."
Ravana agreed and went to the riverbank to pray. The shepherd whispered Ravana's name three times and placed the Atmalinga on the ground. When Ravana returned after his prayer, he saw the Atmalinga on the ground. Infuriated, he chased the young shepherd and punched him in the head. The shepherd transformed into Lord Ganesha and disappeared.
Thus, it turned out that Indra and the other gods had enlisted Ganesha's help to prevent the Atmalinga from reaching Lanka. Ravana tried to lift the Atmalinga, but it wouldn't budge. Vishnu dispelled the illusion of dusk he had created; it was day again. Ravana realized he had been tricked and had no choice but to return to Lanka empty-handed.