Was Thomas Jefferson a Democrat or a Republican?

Was Thomas Jefferson a Democrat or a Republican?