Cristiano Ronaldo overtook Raul as Real Madrid's record scorer when he found the net in his side's 3-0 win over Levante.
The Portugal captain collected the ball around five metres outside the penalty area in the 30th minute of the game at Real's Bernabeu stadium before taking a couple of steps and then smashing a shot into the net for his 324th goal for the Spanish club.
La Liga - 231
Champions League - 67
King's Cup - 21
Spanish Super Cup - 3
European Super Cup - 2
Ronaldo, 30, needed a mere 310 matches across seven seasons to overtake Raul's tally of 323 goals, amassed in 741 games over 16 years.
Alfredo Di Stefano is the only other Real player to get past the 300 mark, netting 308 goals in 396 matches over 11 seasons.
Ronaldo had earlier set up Marcelo's goal in the 27th minute and substitute Jese Rodriguez closed the scoring in the 81st, allowing Madrid to surpass Villarreal atop the standings.
Madrid reached 18 points from eight matches, two points more than Villarreal, which hosts third-place Celta on Sunday.
Defending champion Barcelona, still without Lionel Messi and Andres Iniesta because of injuries, has a chance to join Madrid with 18 points when it hosts Rayo Vallecano at the Camp Nou later on Saturday.
Real Madrid's top scorers:
1. Cristiano Ronaldo (2009-present): 324 goals in 310 official matches over seven seasons.
2. Raul Gonzalez (1994-2010): 323 goals in 741 matches over 16 seasons.
3. Alfredo Di Stefano (1953-1964): 308 goals in 396 matches over 11 seasons.
4. Carlos Alonso (1971-1988): 290 goals in 645 matches over 17 seasons.
5. Ferenc Puskas (1958-1967): 242 goals in 262 matches over nine seasons.
6. Hugo Sanchez (1985-1992): 208 goals in 282 matches over seven seasons.
Source: Al Jazeera and agencies