We present the results of an extensive imaging campaign on the ultracompact
HII region G5.89-0.39 at near- and mid-infrared wavelengths. High-resoluti
on data were taken in the H, K-1, and L bands using ESO's adaptive optics s
ystem ADONIS. They are complemented by conventional narrowband images in Pr
y and H-2(1 - 0)S1 as well as by mid-infrared broad- and narrow-band images
. We also mapped the 1.3 mm continuum emission from the source using the SE
ST. We use our data to consistently explain the morphological appearance of
G5.89-0.39 at all observed wavelengths as well as its spectral energy dist
ribution. The complete model of the source consists of a spherical shell of
dust with an inner, dust-free cavity of 7.6 x 10(16) cm radius surrounding
a star of spectral type O6 ZAMS. Two outflows escape this shell in opposit
e directions. Half of the whole configuration is evidently obscured by a ve
ry massive cloud of cold dust. Comparisons with earlier models and other ul
tracompact HII regions are drawn to put G5.89-0.39 in the context of massiv
e star formation.