Treatment of heart failure in a patient by electrically modulating both the sympathetic and parasympathetic autonomic cardiac nerve fibers that innervate the patients heart at an extravascular site in the pericardial space of the heart. The extravascular site is any suitable single location inside the chest cavity that carries both sympathetic and parasympathetic cardiac nerves such as the cardiac plexus or the pericardial transverse sinus or any two separate extravascular sites with one site carrying predominantly sympathetic cardiac nerves and the other site carrying predominantly parasympathetic cardiac nerves for electrically modulating the balance of autonomic cardiac nerve control. Physiologic inputs from a neuromodulation systems own sensors or from separate implanted or external cardiovascular hemodynamic sensor systems can be used for closed loop control over the balance of sympathetic and parasympathetic cardiac autonomic effects on the patients cardiac function in real time response to chronic and transient physiologic needs.