Villarreal piled the pressure on the under-fire Real Madrid coach, Zinedine Zidane, as they snatched a 1-0 win over the struggling La Liga champions at the Bernabéu.

Real started the day 16 points behind Barcelona in the league and that massive gap remains in tact after a sublime finish from Pablo Fornals finished off an 87th-minute counterattack from the Yellow Submarine, who had Sergio Asenjo to thank for a number of vital saves.

The visitors threatened to break the deadlock after 11 minutes, when Samu Castillejo tried to find Carlos Bacca with a precise pass, only for Raphaël Varane to read the danger and produce a vital interception. That prompted a prolonged spell of pressure from Real, who thought they had opened the scoring when Cristiano Ronaldo headed Toni Kroos’s corner to Gareth Bale to nod home from close range, only for the Welshman to be correctly flagged offside. Marcelo’s thunderous left-footed drive from 30 yards out then drew a brilliant save from Asenjo, who was soon called into action again to tip a swerving free-kick from Ronaldo on to the crossbar.

Villarreal still looked dangerous on their rare forays into the opposition half and Nacho did well to deny Bacca a clean shot on target with a well-timed block. But Real were quick to respond in an entertaining contest and Luka Modric set Ronaldo clear on the right-hand side of the area, only for the Portuguese star to lift the ball over the onrushing Asenjo and wide of the far post. Ronaldo then saw his close-range shot brilliantly saved by Asenjo in the last action of the first half, with Mario Gaspar perhaps fortunate not to concede a penalty for clipping Ronaldo as he raced on to Isco’s low cross.

Villarreal started the second half brightly, with the half-time substitute, Denis Cheryshev, firing wide on 47 minutes, after taking advantage of some hesitant defending, before Kroos volleyed straight at Asenjo at the other end. Modric also forced Asenjo into a routine save before the former Tottenham player blazed over the bar from 15 yards out with 10 minutes remaining.

The home side were made to pay for such profligacy when Villarreal grabbed the winner on the counterattack after clearing a poor Real corner. Cheryshev broke clear down the left and found Enes Ünal in the centre of the penalty area, and although his shot was blocked by the onrushing Keylor Navas, it rebounded to Fornals to chip a first-time shot over the goalkeeper.

Real remain fourth in the Liga standings on 32 points and are only one point and one place above Villarreal and trail Atlético Madrid by 10 points after their city rivals won 1-0 away to Eibar thanks to a solitary strike by Kevin Gameiro. Valencia clung on to beat Deportivo La Coruña 2-1 away to tighten their grip on third place, moving eight points above Madrid although Zidane’s side have a game in hand. Barcelona will re-establish their nine-point lead at the top if Ernesto Valverde’s side beat Real Sociedad on Sunday.

“We don’t deserve this, we think we played well but the ball just didn’t want to go in for us and I cannot explain why,” said Zidane. “We then couldn’t prevent them counterattacking us and it’s really tough on the players.”