We conducted a randomized study of 100 patients to examine the efficacy and risks of two methods of urinary-bladder management after total joint-replacement surgery. Patients who had hip or knee replacement were randomly assigned either to Group I, in which indwelling catheters were placed during the operation and removed the next morning, or Group II, in which urinary retention was treated by intermittent catheterization as needed. After the removal of the indwelling catheter, the patients in Group I had a lower incidence of urinary retention than those in Group II (27 vs. 52 percent; P less than 0.01). Bladder distention (volume above 700 ml) was more common in Group II (45 percent as compared with 7 percent in Group I; P less than 0.01) and was associated with an increased need for subsequent long-term catheterization. There was no significant difference between the groups in the rates of urinary tract infection (11 vs. 15 percent). We could not identify patients at high risk for retention or infection on the basis of preoperative urinary symptoms, previous urinary tract surgery, previous urinary tract infection or urinary retention, high-risk medical conditions, sex, type of anesthesia, or age (in the absence of prophylactic treatment). We conclude that the short-term use of an indwelling catheter after extended surgery, such as joint replacement, reduces the incidence of urinary retention and bladder overdistention, without increasing the rate of urinary tract infection.