In 2002, de la Peña moved to Barcelona neighbours RCD Espanyol, where he gained the continuity and stability to produce some of the best football in his career. In 2004–05 he helped the Catalans finish fifth in La Liga, enabling them to qualify for the UEFA Cup. In the 2006 domestic cup final, de la Peña masterminded a 4–1 victory against Real Zaragoza, setting up two goals: Raúl Tamudo scored after two minutes when he headed in a rebound following a de la Peña free-kick. The pair combined again to carve open the Zaragoza defence to lay on a goal for Luis García; as a result, Espanyol again for the qualified for the UEFA Cup and eventually reached the competition final, losing to Sevilla FC on penalties.