Updated: Jun 26, 2022
Once a huge fight broke out between Brahma and Vishnu as to who was the mightiest of the two. So much so, that they even released their deadly weapons Maheshwar and Pashupat, respectively. Fearing the destruction this would lead to, the devas went running to Shiva for help, who immediately obliged. He transformed himself into Anaalstambha (pillar of fire). The two deadly weapons fell into it, thereby getting demolished and avoiding destruction of the worlds.
Both the gods were surprised by the sudden appearance and power of the pillar. While Vishnu manifested himself into Varaha (boar) avatar and went downwards to find its base, Brahma took the form of a swan and flew upwards to find its limit. Although both were unable to find the base or limit respectively, Brahma lied to Vishnu that he could find the limit! He was told by a Ketaki flower that it was present at the time of creation, yet did not know about the source or limit of the pillar of fire. However, Brahma convinced the flower to give a false testimony to Vishnu, that Brahma had successfully seen the limit.
However, Shiva became very angry with Brahma for the lie and was about to punish him when Vishnu played mediator and asked him to spare Brahma.
Shiva was very pleased with Vishnu's kind nature and accorded him the same stature as that of himself.