Karim Benzema shot Real Madrid to within two points of La Liga leaders Barcelona with the winner in a scrappy 1-0 win over Rayo Vallecano, while countryman Antoine Griezmann fired a brace in a 3-2 win over Real Valladolid to take Atletico Madrid level with Barca.
Benzema's 13th-minute strike was enough for Real to move up to third on 29 points, two behind Barca, who travel to Levante on Sunday evening, and second-placed Atleti.
Sevilla have the chance to move back above Real and level with the leading pair when they host mid-table Girona early on Sunday.
However they were made to sweat for the victory points by plucky Rayo, who are second-from-bottom but would have snatched a point in stoppage time had Sergio Ramos not cleared the second of Thibaut Courtois' double saves, from Alex Alegria and Emiliano Velazquez, off the line.
"That's football," said relieved Madrid coach Santiago Solari.
"That's why it's such a beautiful game. When you're not playing great, when nothing's going right, you have to be prepared to suffer."
"We didn't give much away to Rayo and we created quite a few chances. With all respect to Rayo, who are a great side, I think we should have scored more."