Dani Carval was the unlikely match-winner for Real Madrid as a gritty 2-1 victory at Deportivo Alaves took them top of LaLiga on Saturday.

The right-back prodded home at the end of a chaotic 17-minute period at a sodden Mendizorroza that saw the two sides share three second-half goals.

Sergio Ramos scored first, nodding in Toni Kroos’ free-kick, then turned villain with a foul on Joselu that allowed Lucas Perez to restore parity from the spot.

Madrid rose to the challenge and restored their advantage three minutes after the equaliser to go three points clear of Barcelona, who visit Atletico Madrid on Sunday.

Eden Hazard’s ankle injury opened the door for Gareth Bale to make his first start since October 5 and the winger almost made an early contribution, his deflected header hitting the post in the 10th minute.

Madrid were tasked with responding and Carvajal delivered the decisive goal in quick fashion, prodding home the winner at point-blank range after Pacheco blocked an Isco header on the line.

Alaves pressed hard for a second leveller but desperate goal-line interventions from Marcelo and Areola in the closing stages denied both Perez and Manu Garcia, before Federico Valverde missed a clear chance for a third in the dying seconds.