The emergence of drug resistance mutations in human immunodeficiency virus (HIV) has been a major setback in the treatment of infected patients. Besides the high mutation rate, recombination has been conjectured to have an important impact on the emergence of drug resistance. Population genetic theory suggests that in populations limited in size recombination may facilitate the acquisition of beneficial mutations. The viral population in an infected patient may indeed represent such a population limited in size, since current estimates of the effective population size range from 500 to 10(5). To address the effects of limited population size, we therefore expand a previously described deterministic population genetic model of HIV replication by incorporating the stochastic processes that occur in finite populations of infected cells. Using parameter estimates from the literature, we simulate the evolution of drug-resistant viral strains. The simulations show that recombination has only a minor effect on the rate of acquisition of drug resistance mutations in populations with effective population sizes as small as 1,000, since in these populations, viral strains typically fix beneficial mutations sequentially. However, for intermediate effective population sizes (10(4) to 10(5)), recombination can accelerate the evolution of drug resistance by up to 25%. Furthermore, a reduction in population size caused by drug therapy can be overcome by a higher viral mutation rate, leading to a faster evolution of drug resistance.