The result looked comfortable in the end, but the posts and some wayward finishing meant Portugal were frustrated for much of their FIFA World Cup Group F win against Azerbaijan.
Goals from substitute Silvestre Varela (64), Hélder Postiga (85) and Bruno Alves (88) saw Paulo Bento's side receive some recompense for their dominant performance, as they made it two wins from two in the section, but the first hour of the game had provided plenty of frustration for the home side.
With Azerbaijan lining up to play on the counterattack, Portugal seized the initiative; Kamran Agayev saved from Raul Meireles on 12 minutes, Postiga hit the bar soon afterwards, and the goalkeeper pulled off a superb stop on 23 minutes to deny João Moutinho, whose frustration was compounded when he rattled the woodwork with another effort soon afterwards.
Before the break, Postiga headed wide from two metres out and put another strike against the post, while Cristiano Ronaldo rattled the frame of Agayev's goal for a fourth time after the interval before Varela put his team-mates out of their misery, pouncing on a loose ball. Agayev then pulled out the stops to deny Fábio Coentrão, but Portugal were on a roll, and Ronaldo laid on their second for Postiga before Bruno Alves got his head to a João Moutinho corner to make it 3-0.