Updated

DURBAN, South Africa -- Portugal reached the second round of the World Cup on Friday after a 0-0 draw with group winner Brazil, as two of football's most powerful attacks failed to score a goal.

Both teams had good chances to score but failed to capitalize on them at Moses Mabhida Stadium.

Brazil striker Nilmar had a shot tipped onto the post by Portugal goalkeeper Eduardo in the 30th minute, and Luis Fabiano's close-range header just missed wide in the 39th. Portugal had a goal denied by Brazil goalkeeper Julio Cesar in the 60th, when he just barely tipped wide a shot by Raul Meireles after a dangerous run from Cristiano Ronaldo.

Brazil coach Dunga blamed Portugal's defensive setup for the lackluster result.

"We played to win, but our opponent didn't," Dunga said. "We always tried to attack but they only tried to take advantage of our mistakes."

More On This...

Brazil had already secured advancement and won Group G with seven points, two more than Portugal. Ivory Coast, which beat North Korea 3-0, was third with four points. The Koreans ended with zero.

Portugal came into the match with a huge advantage in goal difference over Ivory Coast, which all but guaranteed its spot in the round of 16 even with a loss.

"Portugal advanced with merits and now we have to start thinking about our next matches," Portugal coach Carlos Queiroz said. "It was a difficult match for Brazil and for us."

The match was one of the most-anticipated in the group stage, a meeting between two talented teams known for their attacking style. Brazil came into the tournament as the top-ranked team, while Portugal is No. 3. Both teams had dominating wins in the previous match, with Brazil beating Ivory Coast 3-1 and Portugal routing North Korea 7-0.

"It was hard to find ways to break through their tough defending, there were too many fouls," Dunga said. "But we still had two or three chances to score."

The result kept alive a 19-match unbeaten streak for Portugal, which hasn't lost since a 6-2 defeat to Brazil in a friendly in 2008 in Brazil's capital of Brasilia. It halted Brazil's seven-match winning streak.

Brazil controlled possession most of the match in front of 62,712 fans at Moses Mabhida, with Portugal relying on quick counterattacks and the skills of Ronaldo.

"Portugal came playing back, trying to use Cristiano Ronaldo on the counterattacks," Julio Cesar said. "It was a difficult group so it was good to finish first. Now the hard part begins and we can't lose anymore."

The best opportunity for the Brazilians fell to Nilmar after a perfect pass from Luis Fabiano, but his close-range shot was deflected by goalkeeper Eduardo and struck the post.

Luis Fabiano, who scored twice against Ivory Coast, also had a golden chance after a cross from Maicon, but his header bounced off the ground and just missed wide with the goalkeeper beaten.

Brazil goalkeeper Julio Cesar made a good save on the shot by Raul Meireles after Ronaldo beat three defenders on the right before Lucio touched the ball across the area and into Meireles' direction.

"We are confident for the next round," Ronaldo said.

Ramires had one of the final chances in injury time when his shot from the top of the area deflected off a defender and Eduardo had to make a difficult save.

Brazil defender Juan made a mistake in one of the final plays and Julio Cesar had to rush out to stop an attempt from Danny.

Both teams played without their top playmakers and it showed in the lack of creativity.

Brazil couldn't count on Kaka because of a late red card in the match against Ivory Coast, while Portugal was without Brazil-born Deco for the second match in a row because of a right hip injury.

The Brazilians also played without starting midfielder Elano because of a right ankle injury sustained in the second half against the Ivorians, and coach Dunga left Robinho out of starting lineup to rest.

Midfielder Daniel Alves had the first chances to open the scoring for Brazil with a long-range shot that missed wide in the sixth minute and another that was saved by Portugal goalkeeper Eduardo in the 17th.

Portugal's first significant opportunity was a one-timer by Tiago that went over the crossbar after a breakaway.

Well marked, Ronaldo had his first chance with a 26th-minute free kick that was never near the target. He also tried from outside the area in the 41st, but Julio Cesar made an easy save.

It was a rough match at times, and Brazil-born Portugal defender Pepe and midfielder Felipe Melo confronted each other after a couple of hard challenges that prompted yellow cards to both. Dunga substituted Felipe Melo just before halftime in an attempt to keep the confrontation from escalating.

Portugal came better for the second half and posed more threats to Brazil.

"Brazil played very strongly in the first few minutes, but after that initial period of domination Portugal slowly started to control the game. In the end, the draw was a fair result," Queiroz said.