Comets originated as icy planetesimals in the outer Solar System, as shown by dynamical studies and direct observation of objects in the Kuiper disk. Their nuclei have low strength consistent with “rubble pile” structure and inhomogeneities on scales of tens to hundreds of meters. These properties can be explained by their formation process in the solar nebula.I present results of numerical simulation of the growth of cometesimals, beginning with a uniform mixture of microscopic grains in the nebular gas. Coagulation and settling yield a thin, dense layer of small aggregates in the central plane of the nebula. Shear between this layer and the pressure-supported gas produces turbulence that initially inhibits gravitational instability. Particles grow by collisional coagulation; relative velocities are dominated by radial motion due to orbital decay induced by gas drag. The radial velocity dispersion further delays gravitational instability until the mean particle size reaches tens of meters. Lack of damping in the swarm of macroscopic particles limits gravitational instability to large scales that do not allow collapse to solid bodies. Collisional coagulation is responsible for growth even after instability occurs. The size distribution of cometesimals growing by drag-induced collisions develops a narrow peak in the range tens to hundreds of meters. This occurs because drag-induced velocities decrease with size in this range, while gravitational focusing is negligible. Impact velocities have a minimum at the transition from drag-driven to gravitational accretion at approximately kilometer sizes. Bodies accreted in this manner should have low mechanical strength and macroscopic voids in addition to small-scale porosity. They will be composed of structural elements having a variety of scales, but with some tendency for preferential sizes in the range ∼10-100 m. These properties are in good agreement with inferred properties of comets, which may preserve a physical record of their accretion.