During diastolic coronary perfusion, blood perfuses through the heart via the coronary arteries. Delivery of a therapeutic and/or diagnostic agent to the heart during diastolic coronary perfusion allows the therapeutic and/or diagnostic agent to efficiently perfuse through the heart. A medical device according to the invention detects closure of the aortic valve of a heart, and initiates delivery of a therapeutic and/or diagnostic agent upon detection of aortic valve closure. The medical device detects aortic valve closure by processing a signal. Exemplary signals used by the medical device to detect aortic valve closure include left or right ventricular accelerometer signals, left or right ventricular flow signals, left or right ventricular pressure signals, aortic pressure signals, pulse pressure signals, systemic arterial pressure signals, electrogram signals, and phonocardiogram signals.