Brain blood flow is regulated to ensure adequate power for neuronal computation. Blood flow is increased to areas where neurons are active, and this increase underlies non-invasive brain imaging using BOLD fMRI. Blood flow is controlled at the arteriole level by smooth muscle, but there is controversy over whether it is also regulated by pericytes at the capillary level. I will demonstrate that neuronal activity mainly increases cerebral blood flow by dilating capillaries via pericytes, that this involves signalling via astrocytes, and that dilation of capillaries and dilation of arterioles are mediated by different messengers. Ischaemia leads to pericytes constricting and dying, thus producing a long-lasting decrease of blood flow, making pericytes a therapeutic target in stroke. I will show that similar events occur in cardiac ischaemia.