It is believed that Lord Vishnu had organized the Nepali people and given them their flag, with the sun and moon as emblems on it. In a Hindu Purana, it is written that it was Lord Shiva who handed the flag to Lord Vishnu, and then Lord Vishnu to Lord Indra, for the purpose for battling demons.