There is an urgent need for antiviral agents that treat SARS-CoV-2 infection. We screened a library of 1,900 clinically safe drugs against OC43, a human beta-coronavirus that causes the common cold and evaluated the top hits against SARS-CoV-2. Twenty drugs significantly inhibited replication of both viruses in vitro. Eight of these drugs inhibited the activity of the SARS-CoV-2 main protease, 3CLpro, with the most potent being masitinib, an orally bioavailable tyrosine kinase inhibitor. X-ray crystallography and biochemistry show that masitinib acts as a competitive inhibitor of 3CLpro. Mice infected with SARS-CoV-2 and then treated with masitinib showed >200-fold reduction in viral titers in the lungs and nose, as well as reduced lung inflammation. Masitinib was also effective in vitro against all tested variants of concern (B.1.1.7, B.1.351 and P.1).