A goal by striker David Villa earned Spain a 1-0 win over neighbor Portugal and a World Cup quarterfinal place after an entertaining match Tuesday in which the Portuguese also created several chances. The alert Villa struck the winner after 63 minutes when he fired the ball into the net off the underside of the bar after his first effort was blocked by excellent goalkeeper Eduardo, having been set up by Xavi's clever back-heel in the area. Portugal right back Ricardo Costa was sent off in the 90th for hitting Spain defender Joan Capdevila in the face with an elbow as the pair tussled on the edge of the area. Spain, the European champion, will meet Paraguay, which earlier won a penalty shootout against Japan after a 0-0 draw, in the last eight at Ellis Park Saturday. “We felt comfortable but you have to be careful because things can change quickly,” said coach Vicente del Bosque. “We know we're working well, we want to create a bit of history.” Portugal coach Carlos Queiroz added: “Spain were much more effective moving the ball around. We were looking for chances on the counter-attack. We had our chances – we just didn't score. “We showed ambition and desire to win but it just wasn't possible. We'll have to come back stronger.” Spain had started the Iberian clash stronger, dominating possession in the early moments, with forwards Fernando Torres and Villa forcing Eduardo to palm away three long distance efforts from the left wing in the first seven minutes. Portugal right back Ricardo Costa composed himself after a torrid start but his side were still unable to keep possession. The Spanish, however, did not make use of their control, rarely able to send a decent ball into the box. Portugal's first chance came in the 20th minute. After good play from lively left back Fabio Coentrao, Tiago's drive was punched high by Iker Casillas and the Spain keeper did well to beat the tall Hugo Almeida to the ball as it came down. Portugal winger Cristiano Ronaldo had been lively, though mostly ineffective, but nearly scored a stunning goal with a fierce, swerving free kick from almost 40 meters that hit a confounded Casillas in the chest and arms and flew to safety. However, Ronaldo again failed to inspire Portugal. Portugal almost went ahead five minutes after halftime, Almeida winning some space on the left and attempting to feed the incoming Ronaldo, but his cross deflected off Carles Puyol's knee and flew inches wide of the Spanish post. Torres was not providing the sort of menace expected of him, and he was replaced in the 58th minute by Fernando Llorente, who took only two minutes to create danger, his flying header from a Sergio Ramos cross kept out by Eduardo. Spain came close once more moments later when Villa sent a curling shot just wide, but the lethal striker was not to be denied and he grabbed his fourth goal of the tournament – to become joint top scorer – with his next effort. Portugal failed to respond immediately and almost suffered again after 70 minutes when Ramos beat Coentrao and fired a low diagonal shot that was tipped for a corner by Eduardo.