Recent advances in low-power sensing devices coupled with the widespread availability of wireless ad-hoc networks have fueled the development of sensor networks. These are typically deployed over wide areas to gather data in the environment and monitor events of interest. The ability to run spatial queries is extremely useful for sensor networks. Spatial query execution has been extensively studied in the context of centralized spatial databases; however because of the energy and bandwidth limitation of sensor nodes these solutions are not directly applicable to the sensor network. In this paper we propose a scalable and distributed way of spatial query execution in sensor networks. We develop a distributed spatial index over the sensor nodes that is used in processing spatial queries in a distributed fashion. We evaluate the behavior of our approach and show that our mechanism provides an efficient and scalable way to run spatial queries over sparse and dense sensor networks. Categor...