The present invention relates to processes for the preparation of erlotinib and salts and polymorphs thereof, preferably of high purity. The present invention also relates to erlotinib and salts and polymorphs thereof preparable by said processes, to medical uses of said erlotinib, salts and polymorphs, and to pharmaceutical compositions comprising the same.