Tin-doped In2O3 layers were prepared by the spray technique with doping concentrationscSn between 1 and 20 at. % and annealed at 500 °C in gas atmospheres of varying oxygen partial pressures. The room-temperature electrical properties were measured. Maximum carrier concentrationsN=1.5×1021cm−3 and minimum resistivities ϱ=1.3×10−4 Ω cm are obtained if the layers are doped withcSn≈9 at. % and annealed in an atmosphere of oxygen partial pressurepO2 ⋦10−20 bar. At fixed doping concentration, the carrier mobility increases with decreasing oxygen pressure. The maximum obtainable mobility can be described in terms of electron scattering by ionized impurities. From an analysis of the carrier concentration and additional precision measurements of the lattice constants and film thicknesses, a defect model for In2O3:Sn is developed. This comprises two kinds of interstitial oxygen, one of which is loosely bound to tin, the other forming a strongly bound Sn2O4 complex. At low doping concentrationcSn≲4 at. % the carrier concentration is governed by the loosely bound tin-oxygen defects which decompose if the oxygen partial pressure is low. The carrier concentration follows from a relationN=K1 ·pO2−1/8 ·(3 ×1010 × cSn −N)1/4 with an equilibrium constantK1=1.4×1015 cm−9/4bar1/8, determined from our measurements.