Did you have both an A/C and fridge on the same circuit? Maybe it was overloaded when both came on together? Better check that the circuit can handle the load of both starting up together.
And yes, VERY lucky you were right there when it happened and noticed something wrong before it got bad. We had an outlet in my parent's kitchen do something similar once, except nothing was even plugged in at the time. Some sort of short. I just looked over and noticed it smoking ever so slightly and hollered for my parents.