An upset occurs in a competition, frequently in electoral politics or sports, when the party popularly expected to win (the favorite), is defeated by an underdog whom the majority expects to lose, defying the conventional wisdom. Such an underdog becomes regarded as a "giant killer", after the story of David and Goliath.
The meaning of the word has sometimes been erroneously attributed to the surprising defeat of the horse Man o' War by the horse Upset (the loss was the only one in Man o' War's career); the term pre-dates that 1919 race by at least several decades. In its sports coverage immediately following Upset's victory, the Washington Post wrote, "One might make all sorts of puns about it being an upset."
In 2002, George Thompson, a lexicographic researcher, used the full-text online search capabilities of the New York Times databases to trace the usage of the verb to upset and the noun upset. The latter was seen in usage as early as 1877. Thompson's research debunked one popular theory of the term's origin, namely that it was first used after the Thoroughbred racehorse Upset became the only horse to defeat Man o' War in 1919.
The meaning of the word "upset" has long included "an overthrowing or overturn of ideas, plans, etc." (see OED definition 6b), from which the sports definition almost surely derived. "Upset" also once referred to "a curved part of a bridle-bit, fitting over the tongue of the horse," (now the port of a curb bit) and though the modern sports meaning of "upset" was first used far more for horse races than for any other competition, there is no evidence of a connection. The name of the horse "Upset" came from the "trouble" or "distress" meaning of word (as shown by the parallelism of the name of Upset's stablemate, Regret).