After Girona conceded a late equaliser in their 1-1 draw at Real Betis, Madrid pulled off a 1-0 win on the road against Alaves to reclaim first place after 18 rounds.
Madrid and Girona are tied on 45 points but Madrid went ahead on a tiebreaker. Defending champions Barcelona are third, seven points off the lead. The Catalan club edged last-placed Almeria 3-2 at home on Wednesday.
Madrid got the late win despite playing with 10 men from the 54th minute after central defender Nacho Fernández was sent off with a straight red card for a foul.
Vázquez was left free inside the area to score the winner with a header after a well-placed corner-kick by Toni Kroos.
Jude Bellingham and Rodrygo, the leaders of Madrid's attack this season, were kept in check during most of the match in a lacklustre performance by Carlo Ancelotti's team at Mendizorroza Stadium. Neither team was able to create significant scoring chances.
After Nacho was sent off, Ancelotti was forced to replace Luka Modric with midfielder Aurélien Tchouaméni, who went into Nacho's position in the middle of defence.
Madrid have been playing with an injury-depleted squad especially in defence. Last Sunday, David Alaba became the third Madrid player to tear an anterior cruciate knee ligament. Éder Militão and goalkeeper Thibaut Courtois also sustained the same type of injury.
Antonio Rüdiger started alongside Nacho in defence on Thursday.
Forward Rodrygo had to be helped off the field with another injury in stoppage time.
Madrid have conceded only 11 goals so far this season, the best mark among all Spanish league clubs.
It was the third loss in a row for Alaves, who are sitting in 16th place, three points clear from the relegation zone.
Girona opened the scoring with a penalty converted by Artem Dovbyk in the 39th, but the hosts equalised with Germán Pezzella in the 88th after a loose ball inside the area.
It was only the second time Girona failed to win in their last 12 matches in all competitions. They had won eight of their last nine league matches, including 4-2 at Barcelona two rounds ago. A 3-0 loss to Madrid at home in September is the team's lone defeat so far this season.
They faced another tough test against a Betis team who are fighting for European places and is yet to lose at home in the league.
"This goal in the end is very upsetting, we thought we had it won," Girona captain Aleix García said. "But we have to value this point, they pressure a lot here. We have to maintain this dynamic and recharge our batteries for what's ahead."
Sixth-place Sociedad managed only a 0-0 draw at relegation-threatened Cadiz.
The hosts sit in 17th place, just outside the demotion zone, and haven't won in 16 consecutive matches in all competitions.
Sociedad are now winless in three straight games.
Mallorca came from behind to defeat Osasuna 3-1 at home.
It was the second win in the last three league matches for Mallorca, who moved to 14th place.
Osasuna, sitting in 13th place, have won only one of their last eight league games - a 1-0 victory over Rayo Vallecano in the previous round.