All the action as it happened the Group A match in Lisbon.
Goalflashes and major incidents:
FULL-TIME: Portugal knock Spain out of the tournament as they secure the victory they need to reach the last eight. Greece also qualify despite losing to Russia.
90 mins: +3 Casillas makes another excellent save, this time to deny Nuno Gomes a second goal as Spain's tournament hopes remain barely alive.
90 mins: +1 Maniche rounds Casillas and sends his goalward shot towards what appears to be an empty net, but Portugal defender Raulo Bravo somehow manages to clear the ball off the line.
88 mins: A superb interchange between Deco and Valente gives Costinha the perfect opportunity to kill off the game, but the Portugal midfielder puts a free header over the bar.
Portugal will hope they will not be made to pay for the glaring miss.
86 mins: Spain adopt a similar strategy, and their direct approach almost pays off as Torres heads wide.
85 mins: The aerial attack continues as Portugal's Maniche nods narrowly over after connecting with Miguel's centre.
84 mins: Valente fires in a cross, but Ronaldo can not leap high enough to meet it and Casillas gathers.
81 mins: As the action flows from end to end, Portugal's Maniche lets fly at goal but is foiled by a smart save from Casillas.
80 mins: Spain fail to make the most of two quick corners as Portugal's defence holds firm.
78 mins: The defensive-minded Petit is brought on to stiffen Portugal's midfield - Figo is the man who makes way.
75 mins: Torres is almost on to a smart pass form Raul but Andrade makes another saving tackle.
73 mins: Figo almost threads a dangerous pass through to Miguel, as Portugal continue to threaten.They are clearly buoyed by their goal, and know they only have to hang on to qualify.
71 mins: Tempers are rising all over the pitch and Ronaldo and Puyol clash on the left wing. The Spanish are beginning to look rattled.
69 mins: From the corner, Costinha sees his header kept out by Casillas.
68 mins: Figo's free-kick is well-saved by Casillas, who dives to his left to turn the ball round the post.
66 mins: Albelda's free-kick is easily dealt with by a packed Portugal defence.
61 mins: Torres is inches away from equalising for Spain as he beats the offside trap with a well-timed run and Ricardo with a well-struck shot. But the ball drifts wide of the upright.
Spain know they must restore parity to avoid an early exit from the tournament, while a win for Portugal takes them into the last eight.
57 mins: GOAL Spain 0-1 Portugal
Nuno Gomes picks up the ball from Figo's flick and the striker turns on the edge of the penalty area and slams a right-footed shot low into the left corner to send the Portugal fans wild.
53 mins: A poor free-kick from Albelda sums up the lack of potency in attack. His weak effort troubles only team-mate Raul, who feels the ball thud into his back.
50 mins: Ronaldo tires to inject some pace into Portugal's attack but the move breaks down as a one-two with Gomes fails to work.
47 mins: Andrade's imposing pressence once more thwarts the Spanish attack as he clears a Vicente cross ahead of Raul.
46 mins: Portugal bring on Nuno Gomes for Pauleta in a straight swap up front.
HALF-TIME: Portugal are being frustrated by Spain's stifling tactics and clear opportunities have been scarce in the first 45 minutes.
By contrast, there have been three goals in the other Group A clash as Russia lead Greece 2-1. If results stay the same at full-time, Portugal are out of the tournament.
45 mins: Ronaldo makes a late run into the box and almost nods Portugal into the lead. But he glances his header just wide with 'keeper Casillas stranded.
44 mins: Vicente's cross is blocked by Miguel and from the resulting corner, Torres misses a great chance when allowed a free header, which he can only redirect the ball over the bar.
41 mins: The middle third of the pitch is beginning to become very congested. Portugal, for all their possession, are lacking the invention needed to open up a stubborn Spanish defence.
And Spain, who do not need to chase victory, seem content to sit on a 0-0 scoreline.
37 mins: Miguel launches a Portugal counter-attack after clearing a Spanish corner and Ronaldo delivers a cross, but it eludes everybody.
35 mins: Raul finds Vicente in space on the left flank and almost collects the winger's cross into the box but is denied by Valente's challenge.
32 mins: Figo smartly makes space for a shot, but delays so long he once more hits the defender in front of him.
30 mins: Portugal make a tactical switch as Figo and Ronaldo swap wings in the hope of greater success in attack.
28 mins: Superb improvisation from Portugal 'keeper Ricardo ends the threat imposed by the on-rushing Torres, who looks bemused as he loses the ball to a sliding challenge.
27 mins: Trickery from Ronaldo earns Figo a shooting chance, but the midfielder can only smash the ball against the Spanish defence.
24 mins: Carvalho shows his confidence as he tackles Vicente in the Portuguese area before nonchalantly backheeling the ball out of danger.
20 mins: Costinha stings the hands of Casillas with a close-range shot as Portugal pour forward with purpose.
And in Group A's other match, Russia have taken a 2-0 lead over Greece. As things stand, a 1-0 win for Portugal would take both the Euro 2004 hosts and Spain into the quarter-finals.
19 mins: Spain winger Andrade makes a crucial sliding interception as Joaquin directs a pass across goal in search of Torres.
17 mins: The pace of the game has increased, and Deco sees a goal-ward volley blocked at one end and Torres makes a bursting run forward at the other as both sides begin to launch quick-fire attacks.
16 mins: Spain make a fast break and Raul is inches short of making contact with a dangerous Vicente cross into the penalty area.
14 mins: Figo skips past the challenge of his Real Madrid team-mate Puyol but Helguera provides the cover for his full-back and snuffs out the danger, leaving Figo on his backside in the process.
11 mins: Portugal begin to find some fluency in their passing, but Ronaldo loses control of the ball as he approaches the Spanish penalty area.
8 mins: Spain's Albelda proves misery loves company as he is booked seconds after Pauleta for a foul on Deco. Albelda would now also miss the quarter-finals.
7 mins: Portugal striker Pauleta needlessly handles the ball and earns a caution - he will now miss the quarter-finals should the hosts get there.
6 mins: Miguel cuts inside from the right flank and fortuitously earns a corner when his poor cross is deflected off Juanito.
From the resulting corner, Portugal earn a free kick but once more Figo's delivery is poor.
5 mins: Spain 'keeper Casillas gets his first touch of the ball as he safely gathers Figo's free kick via a Spanish head.
3 mins: Figo leaves his foot in on Spain's Alonso and concedes the game's first free kick. Both sides have made a cautious start.
1945 BST: Spain kick off to get the crucial Group A clash underway.
Portugal and Spain fans flooded to the Alvalade Stadium four hours before the kick-off
of the crucial Group A game in Lisbon.
The host nation entered the game needing to win to avoid an early exit after losing to
Greece and beating Russia.
Spain were expected to have an estimated 25,000 fans inside the stadium for one of
the most eagerly-awaited games of Euro 2004.
And the atmosphere around the ground was electric as supporters from both sides
provided a colourful backdrop for a game that will have a massive impact on the
Spain's Inaki Saez has made four changes - striker Fernando Torres is in for Fernando Morientes, while Xabi Alonso replaces Ruben Baraja in midfield.
And Joaquin takes the place of the injured Joseba Etxeberria wide on the right and Juanito covers for suspended centre-back Carlos Marchena.
Portugal coach Luiz Felipe Scolari has brought in Cristiano Ronaldo, who has impressed as a substitute in the last two games.
Ronaldo replaces Simao Sabrosa on the left wing, while midfielder Deco keeps his place ahead of Rui Costa.
Spain: Casillas, Puyol, Juanito, Helguera, Bravo, Joaquin, Alonso, Albelda, Vicente, Raul, Torres. Subs: Canizares,
Aranzubia, Capdevila, Baraja, Morientes, Luque, Gabri, Etxeberria, Cesar, Xavi, Valeron.
Portugal: Ricardo, Miguel, Andrade, Ricardo Carvalho, Nuno Valente, Costinha, Figo, Maniche, Deco, Ronaldo, Pauleta. Subs: Quim, Moreira, Paulo Ferreira, Rui Jorge, Couto, Petit, Rui Costa, Simao, Beto, Tiago, Nuno Gomes, Postiga.
Referee: Anders Frisk (Sweden)