The dynamics of a baroclinic boundary current losing buoyancy along its path is analyzed both theoretically and using a numerical ocean-circulation model. A fundamental ingredient in our analysis is that the side boundaries of the ocean basin are sloping gently down to the deep ocean. Theoretically we find that the coastal boundary current develops two branches: one seaward baroclinic jetstream and one barotropic current, which is confined to the continental slope. The baroclinic jetstream decreases its transport as the buoyancy is lost from the surface layer. This decrease in transport is compensated by an increase in the barotropic flow on the slope. When the buoyancy is lost altogether, the entire volume transport occurs in the barotropic slope current. In our numerical experiments we focus on the penetration of warm water over a sill into a cold semi-enclosed basin. The flow enters as a baroclinic current with a thickness approximately equal to the sill depth and proceeds around the basin on essentially the same depth while being transformed to a barotropic slope current which leaves the basin over the sill. It should be noted that the circulation does not involve any renewal of the deep water in the cold basin, except in the initial spin up of the system. We suggest that our results can illuminate some basic aspects of the dynamics in the Nordic Seas, which are invaded by North Atlantic surface water over the Greenland-Scotland Ridge. One striking example; is the observations reported by Orvik et al. (2001), which show that the flow of Atlantic water along the Norwegian coast has two branches: A baroclinic jetstream and a shelf-bound barotropic current. The existence of this double-flow structure is to be expected from our theoretical considerations and numerical simulations.