The Spanish side started very positively with Torres and Villa getting involved early. Torres in the 1st minute itself unleashed one curving ball towards the Portugal goal, but his shot was punched away by the Portugal goalkeeper, Eduardo.
Villa, then came up with a long range effort in the third minute but his shot was denied by the goalkeeper as well.
Villa again hit a low testing drive from the left flank around the seventh minute but again Eduardo made a quick reaction save.
Torres in the 13th minute caught the goalkeeper by surprise as he hit first touch shot from Xavi's corner but his effort was just over the cross-bar.
Portugal came close in the 21st minute as Tiago made a good run but his effort was denied by Casillas.
Xavi, Villa were making good movements and passes ahead of the field, trying to find the opening goal but were unable to find the final touch.
Spain had a scare for a little while as Casillas spilled the ball from a Ronaldo free kick in the 28th minute but luckily for the Spain the ball bounced off the Portuguese players and was driven to safety.
Spanish players had around 60 per cent possession at the end of first 30 minutes.
Almeida got a good opportunity to put the Portuguese ahead in the 39th minute after Ramires put a good ball from the left flank but he failed to connect his header properly. Portugal finished off well towards the end of the first half.
So the teams were 0-0 as the half time whistle was blown.
Spain started off well again holding possession and going for goal but they were unable to find the goal.
Portugal in the 52nd minute came close as Almeida, put a cross from the left which took a big deflection off Puyol that flew just off the right post.
Fernando Llorente who came in as substitute for Fernando Torres came up with a good header but his shot was brilliantly denied by Portugal keeper. And just moments later Villa came up with his right-footed shot but his shot was inches wide of the goal.
Villa made the important breakthrough for Spain in the 63rd minute, his fourth goal of the tournament to give the lead for La furia roja. Xavi flicked a short pass from Andres Iniesta to Villa, whose shot was blocked by Eduardo. However, the rebound fell kindly back into the path of Villa who guided the ball home off the underside of the bar.
Ramos for Spain came close around the 70th minute with a lightening strike with his left foot but his shot was denied by the goalkeeper. Iniesta had made the initial run and cut the ball to the right flank to Ramos who made the run inwards towards the penalty box to produce the shot.
Villa again came up with a short from a distance from the left in the 77th minute, but his shot was saved by the goalkeeper.
The Spanish side were dominating play, dominating possession at that moment of time and their star player Ronaldo hardly featured in the match.
Portugal desperate for the equalizer, desperate to save the match were not able to get their strikers in the game as they were deprived off possession by the Spanish side.
Llorente came up with golden opportunity to seal the game with a header in the 87th minute but his header was just wide off the goal.
Adding to Portugal's misery, Ricardo Costa was red-carded in the 89th minute for elbowing Joan Capdevila. Budweiser Man of the Match was awarded to Xavi who made a significant contribution as his side enjoyed 61 per cent of the possession.
Spain will now face Paraguay in their next match in the quarter-finals.
Villa is surely on the race for the Adidas Golden Boot. He is jointly leading the race with Argentina"s Gonzalo Higuain and Robert Vittek of Slovakia on four goals.