Substitute Costinha scored in the final minute of injury time to secure Portugal's passage into the quarter-finals.

In what had been a drab game, Luis Figo delivered a pinpoint free-kick for the midfielder to flick a header into the Romanian goal.

Only Germany can better Portugal's tally in Group A, while England will have to settle for second place, as long as they win both their remaining games.

For Romania, that final game will be all the trickier for the absence of Gheorghe Hagi, who was booked for a second time in the first half, his second caution of the tournament which means an automatic one match suspension.

That news will come as some comfort to England manager Kevin Keegan, who knows that the most dangerous player in the Eastern European side will not line-up against his team on Tuesday.

First chance

The first clearcut chance elapsed in the 27th minute, when Figo's free kick from the left was headed over by Fernando Couto from the edge of the six yard box.

Gheorghe Hagi: Out of the England game

It was in general a niggly first half, with two other Romanians picking up yellow cards, while Hagi appeared to be pulled back on the edge of the Portugal area by Couto when only Baia stood between him and the opening goal.

Dimas brought a roar from the crowd in the opening minutes of the second half when he hit a rasping drive which went two or three yards over the Romanian crossbar.

At the other end, a header from Viorel Moldovan was diverted from goal by Jorge Costa.

Hagi

Shortly after the hour mark, a ten pass move ended with Petrescu delivering an excellent cross from the right to the far post which Hagi failed to connect with properly.

Luis Figo: Not the influence expected

In the 70th minute, fine work from Couto provided Sa Pinto with a rare heading opportunity, but the midfielder could only head the ball into the arms of Bogdan Stelea

Sa Pinto was back in the action seconds later, when he appeared to be pushed in the penalty area by Cosmin Contra, but no penalty was given.

There was still time for Hagi to test Vitor Baia with one of those long lazy drives which have always been a feature of his play. The Portuguese keeper did well to tip the ball over the crossbar, having stretched to reach it.

The game seemed destined for a goalless draw, until Figo's free-kick and Costinha's important touch.