The behaviour of the cross-sectional polarization field is explored for thin nanowires of barium titanate from first-principles calculations. Topological defects of different winding numbers have been obtained, beyond the known textures in ferroelectric nanostructures. They result from the inward accommodation of the polarization patterns imposed at the surface of the wire by surface and edge effects. Close to a topological defect the polarization field orients out of the basal plane in some cases, maintaining a close to constant magnitude, whereas it virtually vanishes in other cases.