Atletico Madrid are three wins from their first La Liga title since 1996 following a tense victory over Elche.
The hosts had a penalty early in the second half but David Villa’s weak kick was saved by keeper Manu Herrera.
Brazilian centre-back Miranda put them ahead 18 minutes from the end with a header from Jose Sosa’s corner.
And Diego Costa wrapped up victory in injury time with a second penalty after being fouled by Cristian Sapunaru, who was sent off.
The result means that they are six points clear of Real Madrid and seven above Barcelona, although Atletico have played a game more than each of their two title rivals.
If Diego Simeone’s side win their next three games – away to Valencia and Levante and at home to Malaga – they will be champions before their final-day match away to Barcelona.