Intrapartum infection with HIV or hepatitis B occurs from passage through an infected birth canal or by ascending infection if delivery is delayed after rupture of membranes; these viruses can less commonly be transmitted transplacentally.