Pc almost blown up – unknown source

Hello,
Yesterday, I went to a friend of mine to check his PC.
I opened the case and it was full of dust and we both decided to do a clean up (we didn't used any liquid-based product).
After we took care of every component we put them back all together and plugged it in. As soon as I pressed the power button, the whole PC lighten up as if it was about to explode. I then plugged it out and waited for a few minutes.
We then decided to check if it still works and to our amazement it turned on without any problems.
Do you have any idea what might have caused it as it was really dangerous?
I want to do my best to avoid this kind of situation.
