Observations, theory, and modeling studies indicate that dominant components of both the upwelling and downwelling limbs of the thermohaline circulation take place near boundaries and in regions of steep and/or rough topography. Analytic and numerical results are used here to show that the interaction of upwelling regions with lateral boundaries fundamentally alters the resulting large-scale circulation compared to cases of open ocean upwelling. For narrow upwelling regions, viscous fluxes emerge as a leading term in the potential vorticity budget. The strong horizontal recirculation gyres that are found for sub-basin-scale open ocean upwelling (β-plumes) are replaced by weak, unidirectional flow into or out of the region of vertical motion. If the upwelling is located near an island or mid-ocean ridge, potential vorticity budgets require that a strong, large-scale recirculation develop around the topography, sometimes far from the region of mixing. The resulting boundary layers provide an important dynamic link between the large-scale horizontal components of the thermohaline circulation and the small-scale regions of strong vertical motions.