A numerical model has been applied to study the tidal flows of the Bay of Algeciras in the eastern part of the Strait of Gibraltar, focusing on the M2 semidiurnal constituent. The numerical model was satisfactorily validated against a comprehensive set of observations collected in the bay in the year 2011 and the model outputs were used for a detailed analysis of the local tidal circulation. The M2 net (vertically integrated) transport across the mouth of the bay has an amplitude of 2.7×10-3 Sv, while that of the sea surface signal is of ~30 cm and is in quadrature with this flow. However, the vertically integrated flow is the result of a pronounced baroclinic structure consisting of an upper (S<37.5) and lower (S>37.5) layers, whose associated transports are one order of magnitude higher. This reveals a noticeable internal tide that is characterized by an inward (to the head of the bay) propagation and a likely quarter-wave resonance. During the rising tide, Atlantic water from the strait comes in and produces the thickening of the upper (Atlantic) layer in the bay, while Mediterranean water of the lower layer is pushed out to join the Mediterranean water stream that is flowing to the west along the Strait of Gibraltar. During the falling tide, Atlantic water flows out of the bay and incorporates to the eastward flow in the strait. In this tidal phase, Mediterranean water flows into the bay. Therefore, Atlantic and Mediterranean waters accumulate in the bay during the rising and falling tide, respectively. This pattern is opposite to that observed in the strait, where the Mediterranean layer thickens during the rising tide and becomes thinner during the falling tide. This suggests that the internal tide in the bay is basically determined by the baroclinic forcing at its mouth imposed by the baroclinic tide of the Strait of Gibraltar.