The inventors have identified and developed an archaeal light-driven chloride pump (NpHR) from Natronomonas pharaonis for temporally precise optical inhibition of neural activity. NpHR allows either knockout of single action potentials, or sustained blockade of spiking.