In a prospective randomized trial in patients with a history of preoperative pulmonary hypertension who were undergoing surgery for valvular replacement or annuloplasty, the effects of ketanserin (KET) (12 patients) and sodium nitroprusside (SNP) (14 patients) on the systemic and pulmonary circulation and pulmonary shunt fraction (Qsp/Qt) were studied in the immediate postoperative period. The agents were administered at the moment that pulmonary arterial pressure (PAP) tended to rise and cardiac output started to decrease. After administration, systemic arterial BP, PAP, systemic and pulmonary (PVR) vascular resistance, and right ventricular stroke work (RVSW) decreased significantly in both groups. The decrease in mean pulmonary arterial pressure (p less than .01), PVR (p less than .01), and RVSW (p less than .05) was significantly more pronounced in the KET than in the SNP group. Qsp/Qt significantly (p less than .001) increased in the SNP group, but significantly (p less than .05) decreased in the KET group; the response was significantly different between the two groups (p less than .001). In six patients, SNP converted pacemaker-dependent heart rate into a spontaneous rhythm, whereas this occurred in only one patient in the KET group. We concluded that KET, as opposed to SNP, reduces PVR without increasing Qsp/Qt in the lung, which is particularly advantageous in patients after valvular surgery.