Future mobile networks are envisioned to become multi-service systems, enabling the dynamic deployment of services with vastly different performance requirements, accommodating the needs of diverse service providers. Virtualizing the mobile network infrastructure is of fundamental importance for realizing this vision in a cost-effective manner. While there have been extensive research efforts in virtualization for the mobile core network, virtualization in the radio access network (RAN) is still at an early stage. In this paper, we present AIRTIME, a new RAN slicing system that enables the dynamic on-the-fly virtualization of RANs, with the programmability required by service providers to customize any aspect of their virtual RAN to meet their service needs. We present a prototype implementation of AIRTIME and evaluate the: (i) capacity to create virtual RANs on-the-fly, (ii) performance experienced by slice owners, (iii) isolation among multiple virtual RANs sharing the same physical infrastructure, and (iv ) scalability to accommodate a large number of virtual RANs.