 He had his first main squad opportunity on 24 January 2004, playing 15 minutes in a 2–1 home win against Villarreal CF after solid performances with the B-team.Over that and the following seasons, he would play a further five La Liga matches.Juanfran was loaned out to RCD Espanyol for 2005–06 and, although the Catalan side barely avoided relegation, he featured heavily throughout the campaign, scoring on 22 March 2006 in a 1–1 draw at Athletic Bilbao.