Abstract We develop a three-dimensional numerical model for barotropic tidal flows in the coastal ocean useful in a weakly nonlinear regime. The flow field can then be split into a first-order linear, harmonic tidal flow and a second-order, nonlinearly induced mean or residual flow. First we test the model against two different, but well-established, tidal models, that of Leendertse and that of Ianniello. The model is successful in nearly replicating these earlier model results for an estuarine setting. We then apply the model first to an isolated, straight continental shelf. The mean flow generated then flows primarily alongshelf. We name this the Tee Current after Tee’s (1980) discovery of this current with a two-dimensional model that neglected all alongshelf variations. The Tee current appears to be ubiquitous on shelves as well as persistent and to have alongshelf transport that is an appreciable fraction of that produced by buoyancy forcing, for example. Its dynamics is analogous to that of alongshore currents in the surf zone. For a long, straight shelf the Tee Current is directed alongshelf opposite the sense of the first order tidal current offshore major axis. For the cases we analyzed, this current direction was upshelf, i.e., opposite the direction of coastally trapped wave propagation. The model results show that the presence of a large, adjacent estuary alters the flow fields of both the first and second order tides significantly. Eulerian mean transport leaving the estuary turns cyclonically to join and reinforce the Tee Current on the inner shelf. From an application to the Delaware Estuary and adjacent shelf we find excellent agreement between modeled and observed first-order tidal currents, but only modest agreement between second-order mean currents.