Atletico Madrid took another step towards their first La Liga title for 18 years as two goals in the last 20 minutes handed them a 2-0 win over Elche at the Vicente Calderon on Friday.
After a poor opening period from the hosts, they wasted a great chance to go in front 10 minutes after the break as David Villa's penalty was saved by Manu Herrera.
The league leaders did eventually make the breakthrough 19 minutes from time when Miranda headed home Jose Sosa's cross and Diego Costa converted a second Atletico penalty of the night late on after Christian Sapunaru was sent-off for Elche.
Victory moves Atletico six points clear of Real Madrid at the top of the table and within three wins of sealing the title.
Los Rojiblancos' attention now turns to facing Chelsea in the first leg of their Champions League semi-final on Tuesday.
"The players put in a great effort and now we have to recover as best we can for the game on Tuesday," said Atletico boss Diego Simeone.
"It is a very important game for the club, the fans and the history of Atletico Madrid."
However, there remains some doubt as to whether one of Atletico's key men, goalkeeper Thibaut Courtois, will be able to face his parent club.
The Belgian international was in fine form once more on Friday as he made two crucial first-half saves from Javi Marquez and Sapunaru to keep Atletico level at the break.
And Simeone is confident Courtois will be free to play after UEFA ruled a clause in his loan agreement that would force Atletico to pay an extra fee to field him ineligible.
"In principle he will play. Until the president or directors come to tell me that he can't, we will assume he can play."
In contrast to their recent displays at home, Atletico were very slow out of the blocks and didn't really get going until Raul Garcia replaced Adrian Lopez at half-time.
Garcia made an instant impact as he was dragged down inside the area by Sapunaru.
David Villa assumed the penalty taking duties after Costa had missed against Getafe last week, however the Spanish international was also denied as Manu Herrera sprung to his left to turn the ball behind.
Villa then had a goal rightly ruled out for offside and Garcia headed just over as the pressure began to build from Atletico.
And the goal finally arrived when Sosa's corner was met by a brilliant header from Miranda to sent the ball back across goal into the corner of the net.
Costa had a great chance to kill the game off as he raced onto a fine through ball from Diego Ribas two minutes from time, but Herrera made a fine low save with his legs.
Two minutes later, though, Costa was bearing down on goal again when Sapunaru bundled him over and was shown a straight red card for denying a clear goalscoring opportunity.
Costa dusted himself down and rolled home the penalty to register his 35th goal of the season and sent Atletico into the Chelsea clash in high spirits.