Although cortical interneurons are apparently well-placed to suppress seizures, several recent reports have highlighted a paradoxical role of perisomatic-targeting parvalbumin-positive (PV+) interneurons in ictogenesis. Here, we use an acute in vivo model of focal cortical seizures in awake behaving mice, together with closed-loop optogenetic manipulation of PV+ interneurons, to investigate their function during seizures. We show that photo-depolarization of PV+ interneurons rapidly switches from an anti-ictal to a pro-ictal effect within a few seconds of seizure initiation. The pro-ictal effect of delayed photostimulation of PV+ interneurons was not shared with dendrite-targeting somatostatin-positive (SOM+) interneurons. We also show that this switch can be prevented by overexpression of the neuronal potassium-chloride co-transporter KCC2 in principal cortical neurons. These results suggest that strategies aimed at improving the ability of principal neurons to maintain a trans-membrane chloride gradient in the face of excessive network activity can prevent interneurons from contributing to seizure perpetuation.