We show that a velocity field in geostrophic and hydrostatic balance on the f-plane can be diagnosed from an arbitrarily prescribed distribution of buoyancy in a basin with closed depth contours. We emphasize the steady-state circulation associated with a large-scale horizontal buoyancy gradient, attained in the absence of wind forcing. For inviscid motion, the diagnosed field contains a free barotropic along-isobath flow which can be chosen arbitrarily, e.g. in such a way that the buoyant "southern" pool of surface water essentially recirculates. Including bottom friction, we show that steady motion requires that the net Ekman transport across closed depth contours must vanish. This constraint determines the free barotropic motion and thereby the entire velocity field, which proves to be independent of the strength of the bottom friction. The barotropic flow component serves to create a "thermohaline" circulation, i.e. a circulation which tends to spread the buoyant water horizontally. Analytical solutions and results from a numerical experiment are presented to illustrate the steady flow resulting in a basin where the upper-ocean density increases across the basin.