Rayo took an early lead in a see-saw game before Real went 2-1 ahead. Rajo equalised before half-time before winning the match with a twice-taken penalty from Oscar Trejo in the 67th minute.
After 13 matches, Barcelona are top on 34 points to Real Madrid's 32.
Source: www.beinsports.com