Once there was a fierce battle between Lord Brahma and Lord Vishnu, and the two released their deadly weapons – Maheshwar and Pashupat, which could destroy the whole creation. Seeing this Lord Shiv manifested as the Analsthambha (pillar of fire). The weapons fell into the pillar and got destroyed.
Brahma and Vishnu were taken by surprise as they saw the enormous pillar of fire touching the sky and penetrating down the Earth. Vishnu transformed Himself into a boar and went to the ‘Patal’ (nether world) to find the base of that ‘pillar of fire’ but in vain. Similarly Brahma transformed Himself into a swan and flew up to find its limit. While going through the aerial route he met a withered Ketaki flower, which still had some freshness and fragrance. Ketaki flower told Brahma that it had been present there since the beginning of Creation but could never know the origin and/or end of that ‘pillar of fire’. The flower also advised Brahma against making any effort in that direction, as it would be of no use. Lord Shiva smiled at the futile attempts of both Brahma and Vishnu.
Brahma then sought the help of & convinced Ketaki flower to be a false witness before Vishnu, that He (Brahma) had been successful in finding the limit of that ‘pillar of fire’. Both of them went to Vishnu and told him the concocted story of reaching the limit of ‘pillar of fire’. Vishnu accepted the superiority of Brahma. Shiva got angry with Brahma for His falsehood & proceeded to punish Him. Out of anger Shiva opened His ‘third eye’ out of which ‘Bhairav’ got manifested, to kill Brahma. Vishnu intervened to get Brahma’s life spared. Shiva, pleased with Vishnu, accorded Him the same status as that of His own but told Brahma that He lied due to His desire to be worshipped but now He would be cursed and not be worshipped by anyone. Brahma begged forgiveness then Shiva having pity gave Him the boon of being the presiding deity of all the yagyas. Similarly the Ketaki flower was also prohibited from being used during worship but when Ketaki flower tendered its apology Shiva blessed that it would be fortunate to be offered to Vishnu during prayer.
The story very well conveys that the Laws & Principles of Creation are applicable for gods also, not just for humans.
Let us be sure that we will have to bear the consequences of our actions, no matter how smart we think we are. When we are fooling someone or doing a negative karma, there is a mechanism which records it automatically and there is another mechanism which makes the opposite of it to happen to us, someone fools us. The indications of these stories of Puranas are very clear to mankind that we would have to pay for what we have done.