The linear, viscid, continuously stratified model of McCreary (1981) is extended to allow for thermohaline forcing by a specified, longitudinally independent, surface density field ρs. When the ocean is unbounded and ρs is steady, the density field is altered throughout the water column by vertical diffusion. If ρs increases poleward, the resulting pressure field slopes downward toward the pole in the upper water column, and there is an associated eastward geostrophic current. This interior current forces downwelling at an eastern ocean boundary, and generates a poleward surface coastal current and an equatorward undercurrent. For realistic choices of model parameters the coastal circulation is as strong as, and opposite in direction to, that caused by a typical equatorward wind stress τy. When ρs oscillates at the annual cycle, the unbounded flowis confined to a surface boundary layer. The coastal circulation is qualitatively quasi-steady, but also has characteristics of a vertically propagating Kelvin wave.One solution is forced by an idealized representation of the observed ρs and τy fields off the west coast of Australia. This solution compares well with observations of the oceanic circulation there. In particular, there is a surface coastal jet (the model Leeuwin Current) that flows against the wind. This successful comparison suggests that the mean circulation in the region is significantly forced by ρs, whereas the annual variability is strongly forced by τy.