Villa had the ball in the net after 14 minutes, rounding the keeper and finishing into the empty, but he was correctly called offside after straying a yard beyond the last defender.
However the striker did open the scoring after 37 minutes, turning home Costa’s low cross into the six yard box at the near post. But Villa was withdrawn just minutes later after appearing to sustain a hamstring injury.
After a nervy start to the second half Atletico found the crucial second goal when Costa broke the Sociedad offside trap to latch on to a long ball over the top and sidefoot into the bottom corner.
Miranda added a third, heading home from a corner, before Diego marked his return to the club with the fourth goal of the night, arriving late in the box to control a cross and fire high into the net.