By the 1860s, the classical theory of electricity and magnetism was on a very solid theoretical footing. Maxwell's equations describing the interplay of charges and currents with electric and magnetic fields were on paper by 1862, and with some changes in notation they're the exact same today. Relativity wouldn't be invented for another half-century or so, and that makes it all the more remarkable that Maxwell's equations don't actually need to be modified at all to work in a relativistic framework. Lorentz covariance is built right in, though it's a bit hidden.
But Maxwell and Faraday and Ampere and the rest didn't know that. There were some tantalizing hints though, and in fact it was the exploration of classical electrodynamics that led Einstein to the theory of special relativity. It's entertaining to take a look at some of those hints, which are lurking right there in second-semester intro physics.