This paper derives several lagrange multiplier (LM) tests for the panel data regression model with spatial error correlation. These tests draw upon two strands of earlier work. The first is the LM tests for the spatial error correlation model discussed in Anselin (Spatial Econometrics: Methods and Models, Kluwer Academic Publishers, Dordrecht; Rao's score test in spatial econometrics, J. Statist. ... [Show full abstract] Plann. Inference 97 (2001) 113) and Anselin et al. (Regional Sci. Urban Econom. 26 (1996) 77), and the second is the LM tests for the error component panel data model discussed in Breusch and Pagan (Rev. Econom. Stud. 47(1980) 239) and Baltagi et al. (J. Econometrics 54 (1992) 95). The idea is to allow for both spatial error correlation as well as random region effects in the panel data regression model and to test for their joint significance. Additionally, this paper derives conditional LM tests, which test for random regional effects given the presence of spatial error correlation. Also, spatial error correlation given the presence of random regional effects. These conditional LM tests are an alternative to the one-directional LM tests that test for random regional effects ignoring the presence of spatial error correlation or the one-directional LM tests for spatial error correlation ignoring the presence of random regional effects. We argue that these joint and conditional LM tests guard against possible misspecification. Extensive Monte Carlo experiments are conducted to study the performance of these LM tests as well as the corresponding likelihood ratio tests.