Instrumental variables estimators are designed to provide consistent parameter estimates for linear regression models when some covariates are correlated with the error term. We propose a new robust instrumental variables estimator (RIV) which is a natural robustification of the ordinary instrumental variables estimator (OIV). Specifically, we construct RIV using a robust multivariate location and scatter S-estimator to robustify the solution of the estimating equations that define OIV. RIV is computationally inexpensive and readily available for applications through the R-library riv. It has attractive robustness and asymptotic properties, including high resilience to outliers, bounded influence function, consistency under weak distributional assumptions, asymptotic normality under mild regularity conditions, and equivariance. We further endow RIV with an iterative algorithm which allows for the estimation of models with endogenous continuous covariates and exogenous dummy covariates. We study the performance of RIV when the data contains outliers using an extensive Monte Carlo simulation study and by applying it to a limited-access dataset from the Framingham Heart Study-Cohort to estimate the effect of long-term systolic blood pressure on left atrial size.