Where did the word scot originate?

It is slang for "Scottish," which comes from "Scotland," which is a country.