We extend the deterministic population genetics formulation of the quasispecies model [Phys. Rev. E, 54, 4048 (1996)] to finite populations in order to investigate analytically the dependence of the error threshold on the population size. In particular, we find that for large populations the replication accuracy at the threshold increases linearly with the reciprocal of the population size. Moreover, in contrast to the deterministic case, for small populations the error threshold transition is inevitable, whatever the value of the selective advantage of the master string.