Let Ω ⊂ Cn, n ≥ 2, be a domain with smooth connected boundary. If Ω is relatively compact, the Hartogs-Bochner theorem ensures that every CR distribution on ∂Ω has a holomorphic extension to Ω. For unbounded domains this extension property may fail, for example if Ω contains a complex hypersurface. The main result in this paper tells that the extension property holds if and only if the envelope of holomorphy of Cn Ω is Cn.It seems that it is a first result in the literature which gives a geometric characterization of unbounded domains in Cn for which the Hartogs phenomenon holds. Comparing this to earlier work by the first two authors and Z. S lodkowski, one observes that the extension problem sensitively depends on a finer geometry of the contact of a complex hypersurface and the boundary of the domain.