Spatiotemporal activity patterns in three-dimensionally organized cellular networks are fundamental to the function of the nervous system. Despite advances in functional imaging of cell populations, a method to resolve local network activity in three dimensions has been lacking. Here we introduce a three-dimensional (3D) line-scan technology for two-photon microscopy that permits fast fluorescence measurements from several hundred cells distributed in 3D space. We combined sinusoidal vibration of the microscope objective at 10 Hz with 'smart' movements of galvanometric x-y scanners to repeatedly scan the laser focus along a closed 3D trajectory. More than 90% of cell somata were sampled by the scan line within volumes of 250 microm side length. Using bulk-loading of calcium indicator, we applied this method to reveal spatiotemporal activity patterns in neuronal and astrocytic networks in the rat neocortex in vivo. Two-photon population imaging using 3D scanning opens the field for comprehensive studies of local network dynamics in intact tissue.