Thomas Dewey was leading right up to the last minute against Harry S Truman, in 1948, and there was even a newspaper headline attesting to the fact that President-Elect Dewey was on his way to the White House.
A funny thing happened before nightfall.