A nonlinear, two-layer, rigid-lid model has been solved numerically by means of a generalized Lax-Wendroff finite difference scheme in order to study the generation of internal tides in the Strait of Gibraltar. Preliminary numerical experiments on asymptotically steady-state solutions in the presence of a constant mean flow are used to validate the model: previous laboratory experiments and analytical solutions are indeed accurately reproduced. Periodic solutions representing the internal tides at Gibraltar are then obtained by allowing a semidiurnal barotropic tidal current to interact with an idealized topographic variation modelling the Camarinal sill. Numerical experiments with and without a basic constant mean flow are carried out and a reasonable agreement is found with XBT data. A two-dimensional propagation model for long internal waves was recently applied to some internal tides at Gibraltar - assumed as known - in order to model internal solitary waves observed in the Alboran Sea. The manner in which use of the present generation model in conjunction with such a nonlinear dispersive propagation model makes it possible to follow the various stages of the life of the internal tide is discussed. The input for the coupled model would then reduce to the mean and tidal flows in the strait.