Time perception emerges from an interaction among multiple processes that are normally intertwined. Therefore, a challenge has been to disentangle timekeeping from other processes. Though the striatum has been implicated in interval timing, it also modulates nontemporal processes such as working memory. To distinguish these processes, we separated neural activation associated with encoding, working-memory maintenance, and decision phases of a time-perception task. We also asked whether neuronal processing of duration (i.e., pure tone) was distinct from the processing of identity (i.e., pitch perception) or sensorimotor features (i.e., control task). Striatal activation was greater when encoding the duration than the pitch or basic sensory features, which did not differentially engage the striatum. During the maintenance phase, striatal activation was similar for duration and pitch but at baseline in the control task. In the decision phase, a stepwise reduction in striatal activation was found across the 3 tasks, with activation greatest in the timing task and weakest in the control task. Task-related striatal activations in different cognitive phases were distinguished from those of the supplementary motor area, inferior frontal gyrus, thalamus, frontoparietal cortices, and the cerebellum. Our results were consistent with a model in which timing emerges from context-dependent corticostriatal interactions.