Patients initially assigned to Arm I (ZDV plus 3TC) who have RNA values greater than 10,000 copies at week 12, 24, or 36 are assigned to switch protocol treatment to d4T + ritonavir + nevirapine. Patients may enroll in Step 2 no later than week 38 of PRAM-1. [AS PER AMENDMENT 1/5/98: Patients initially assigned to Arm 1 with viral load greater than 100,000 copies may also switch to Step 2 or discontinue therapy. Patients originally assigned to Arms I or II with viral load greater than 10,000 may continue their current drugs or discontinue study therapy; those with viral load greater than 100,000 should discontinue study drugs.] [AS PER AMENDMENT 7/17/98: PRAM-1 has been extended to permit long-term follow-up of clinically stable, HIV-infected children for a total of 120 weeks. Patients still on initial treatment assignment for all three treatment arms are eligible for this extension, as are children from PRAM-1, Step 2. Step 2 is now closed to enrollment. Patients on 3TC/ZDV who reach virologic failure must discontinue study therapy].