The Rioja Trough is the foreland basin of the western Pyrenees (to the north) and the Cameros-Demanda Massif (to the south). This E–W elongated trough is about 120×35 km. It was filled with Tertiary continental deposits (upper Eocene to upper Miocene), reaching thicknesses between 2500 and 5000 m. Both margins of the Rioja Trough are large thrusts with horizontal displacements of more than 20 km basinward. Rocks that fill the basin originated in alluvial fan and playa-lake environments, with conglomerates in the proximal sectors grading into sandstones, mudstones, lacustrine limestones and evaporites in distal sectors. The Tertiary series are horizontal in the central parts of the basin, with several E–W monoclines caused by north-verging thrusts in the basement of the basin. Near the basin margins, the Tertiary units are folded and thrusted, with several syntectonic unconformities. Calculated velocities for the Cameros-Demanda thrust range from 0.02 to1.1 mm yr−1 (average 0.7 mm yr−1). The sedimentation rate near the southern basin margin varies between 2 and 20 cm 1000 yr−1 (average 10 cm 1000 yr−1). Deposition in the Rioja Trough was strongly controlled by tectonic activity throughout the Tertiary. Eight tectosedimentary units (R1 to R8) have been characterized. These are bounded by angular unconformities at the margins and breaks in the vertical trend of the sedimentary record toward the basin centre. Every tectosedimentary unit (except R6 and R8) shows a fining-upward/coarsening-upward trend, corresponding to tectonic retrogradations and progradations, respectively. The main source area during the Palaeogene was the Cameros-Demanda Massif, whose unroofing sequence was strongly dependent on tectonic activity. During the Neogene a longitudinal WNW–ESE drainage system, with short alluvial fans in the northern and southern margins, developed. The final shape and the evolution of the Rioja Trough are the result of crustal flexure in the northern border of the Iberian plate, linked to the emplacement of the southern Pyrenean thrust system, and intraplate thrusting with basement uplift at its southern margin.