What is the history behind throwing in the towel?

If a boxer is in danger during a fight, his "corner man" throws a towel into the middle of the boxing ring. The referee then wil stop the fight immediately. In this way the "corner man" avoids that his boxer will receive a teribble beating. Henk van Campen, topsportconsultant and former boxer