This paper considers the estimation and inference of spatial panel data models with heterogeneous spatial lag coefficients, with and without weakly exogenous regressors, and subject to heteroskedastic errors. A quasi maximum likelihood (QML) estimation procedure is developed and the conditions for identification of the spatial coefficients are derived. The QML estimators of individual spatial coefficients, as well as their mean group estimators, are shown to be consistent and asymptotically normal. Small-sample properties of the proposed estimators are investigated by Monte Carlo simulations and results are shown to be in line with the paper's key theoretical findings, even for panels with moderate time dimensions and irrespective of the number of cross-section units. A detailed empirical application to US house price changes during the 1975-2014 period shows a significant degree of heterogeneity in spatiotemporal dynamics over the 338 Metropolitan Statistical Areas considered.