More than a hundred sauropod tracksites, ranging in age from Middle Jurassic (Bathonian) to Late Cretaceous (Maastrichtian), are reported from the Iberian Peninsula (Spain and Portugal). Sauropod trackway orientation patterns throughout an entire geographic area such as the Iberian Peninsula and over different time periods may provide new data about the palaeoecology and behavioural patterns of sauropods. The studied tracksites exhibit two main trackway orientation patterns, directional and random, indicating different behaviours in gregarious or solitary (milling) individuals. Gregarious behavioural patterns are mainly observed within Parabrontopodus/Breviparopus-like and Brontopodus-like ichnotypes of a single size class (either small or medium-sized), indicating age segregation. Among the gregarious sauropods the former ichnotype is linked with inland environments, while the latter is mainly linked with coastal environments. Solitary trackways are mainly of medium-sized to large individuals, are also linked with both inland (Parabrontopodus/Breviparopus-like) and coastal environments (Parabrontopodus/Breviparopus-like, Brontopodus-like), and belong to the above-mentioned ichnotypes as well as to Polyonyx-like ichnotypes. Thus, no obvious link between gregarious behaviour and the palaeoenvironmental setting can be inferred from the sauropod track record of the Iberian Peninsula. Nonetheless, sauropod trackways showing titanosauriform characters (Brontopoduslike) are more common in coastal environments, contrary to what might be expected given this group's apparent taxonomic preference for inland environments.Keywords: Sauropod trackways, palaeoecology, gregarious behaviour, Jurassic, Cretaceous, Iberian Peninsula Resumen El registro Ibérico (España y Portugal) de icnitas de saurópodos está representado por más de cien yacimientos cuya edad varía desde el Jurásico Medio (Batoniense) al Cretácico Superior (Maastrichtiense). El estudio de la orientación de los rastros, en un área determinada como la Península Ibérica y en diferentes edades, nos ha permitido obtener nuevos datos sobre el comportamiento de los saurópodos. Los rastros de los yacimientos estudiados presentan dos patrones de movimiento distintos, direccionales y aleatorios, que reflejan distintos comportamientos en individuos gregarios o solitarios (deambulantes). El patrón que indica comportamiento gregario se observa en los icnotipos "Parabrontopodus/Breviparopus-like" y "Brontopodus-like" en saurópodos del mismo tamaño (pequeño o medio), lo que indica segregación por edad. El primer icnotipo se ha conservado en sedimentos depositados en ambientes terrestres mientras que el segundo lo hace fundamentalmente en ambientes costeros. Los rastros solitarios son, en su mayoría, de saurópodos de tamaño medio o grande, conservados tanto en medios terrestres ("Parabrontopodus/Breviparopus-like"), como costeros ("Parabrontopodus/Breviparopus-like" y "Brontopodus-like") y pertenecen a los dos icnotipos mencionados anteriormente y a un tercero: "Polyonyx...