The final stop sweating

Is the heart a part of the circulatory system or nervous system?