The basal ganglia are subcortical nuclei that control voluntary actions, and they are affected by a number of debilitating neurological disorders. The prevailing model of basal ganglia function proposes that two orthogonal projection circuits originating from distinct populations of spiny projection neurons (SPNs) in the striatum--the so-called direct and indirect pathways--have opposing effects on movement: activity of direct-pathway SPNs is thought to facilitate movement, whereas activity of indirect-pathway SPNs is presumed to inhibit movement. This model has been difficult to test owing to the lack of methods to selectively measure the activity of direct- and indirect-pathway SPNs in freely moving animals. Here we develop a novel in vivo method to specifically measure direct- and indirect-pathway SPN activity, using Cre-dependent viral expression of the genetically encoded calcium indicator (GECI) GCaMP3 in the dorsal striatum of D1-Cre (direct-pathway-specific) and A2A-Cre (indirect-pathway-specific) mice. Using fibre optics and time-correlated single-photon counting (TCSPC) in mice performing an operant task, we observed transient increases in neural activity in both direct- and indirect-pathway SPNs when animals initiated actions, but not when they were inactive. Concurrent activation of SPNs from both pathways in one hemisphere preceded the initiation of contraversive movements and predicted the occurrence of specific movements within 500 ms. These observations challenge the classical view of basal ganglia function and may have implications for understanding the origin of motor symptoms in basal ganglia disorders.