Jade Boko was on target as Logrono defeated Eunice Beckmann's Madrid 2-1 at the Estadio Nuevo Municipal Las Gaunas on Sunday.
On the back of a 4-3 defeat at Athletic Club, the topflight debutants were hoping to end their four-match winless run and their prayers were answered via the Equato-guinean late effort.
On the other hand, Madrid were aiming to ease their relegation woes after no win in six games, but the two teams played out a 0-0 first half draw.
Vanesa Santana broke the deadlock three minutes after the restart through Fatoumata Kenteh's assist but Laura levelled matters for the visitors in the 62nd minute.
Deep inside the injury time, Boho scored her third goal in four consecutive games to boost Chechu Martinez's side survival hopes at the expense of fellow strugglers Madrid.
Equatorial Guinea's Dorine Chuigoue and Zambia's Barbara Banda lasted the entire duration of the match for Logrono, while Cote d'Ivoire's Ida Guehai played for 46 minutes.
With the win, Logrono are now 15th with 20 points from 24 games and they will face Sporting Huelva, while 15th-placed Madrid will entertain rock-bottom Malaga.