Thalamic relay neurons have well-characterized dual firing modes: bursting and tonic spiking. Studies in brain slices have led to a model in which rhythmic synchronized spiking (phasic firing) in a population of relay neurons leads to hyper-synchronous oscillatory cortico-thalamo-cortical rhythms that result in absence seizures. This model suggests that blocking thalamocortical phasic firing would treat absence seizures. However, recent in vivo studies in anesthetized animals have questioned this simple model. Here we resolve this issue by developing a real-time, mode-switching approach to drive thalamocortical neurons into or out of a phasic firing mode in two freely behaving genetic rodent models of absence epilepsy. Toggling between phasic and tonic firing in thalamocortical neurons launched and aborted absence seizures, respectively. Thus, a synchronous thalamocortical phasic firing state is required for absence seizures, and switching to tonic firing rapidly halts absences. This approach should be useful for modulating other networks that have mode-dependent behaviors.