A detailed look at how it happened and how to keep it from happening to you.