Newcomer Luis Fabiano scored twice and goalkeeper Julio Cesar thwarted several chances to rally Brazil past Uruguay 2-1 on Wednesday to move into a tie with Colombia for third place in South American World Cup qualifying.
However, Uruguay took an early lead and dominated much of the match at Sao Paulo's Morumbi stadium.
Fabiano scored just before half-time and added a second in the 64th minute to give Brazil eight points after four rounds.
Brazil climbed to within two points of South American group leaders Paraguay and one behind Argentina. Colombia, who upset Argentina 2-1 on Tuesday, also have eight points but trail on goal difference.
The top four teams qualify for the 2010 World Cup and the fifth-place nation goes to a playoff with the fourth-place finisher from CONCACAF qualifying.
Very little went right for Brazil, which hadn't defeated Uruguay in eight years and played one of their worst games of the qualifiers.
"We couldn't even connect our passes," Brazil coach Dunga said. "We didn't play well -- especially in the first period -- but we certainly will improve."
Coming off a disappointing 1-1 draw with Peru on Sunday, Brazil fielded a modified team with Sevilla striker Luiz Fabiano replacing Vagner Love and defender Alex starting for captain Lucio, who sat out a one-game suspension.
But Uruguay, who drew 2-2 with Chile on Sunday, surprised Brazil with an aggressive start and pinned the Brazilians in their own half.
Brazil's first chance was a breakaway in the sixth minute by Real Madrid striker Robinho, who forced keeper Fabian Carini to make a diving stop.
But Uruguay opened the scoring two minutes later when Sebastian Abreu met a cross from the byline with a diving header.
Brazil, with the support of a sellout crowd of 65,000 behind them, tightened up defensively and tried to counter, exploiting the speed of Robinho, Kaka and Luis Fabiano.
In the 12th minute, AC Milan striker Kaka streaked up the middle on another breakaway and appeared to be tripped in the penalty area by Walter Gargano, but Argentine referee Hector Baldassi called the foul against the Brazilian.
Uruguay remained in control and attacked at will. Cristian Rodriguez came within centimeters of increasing the advantage, and only a series of spectacular saves by Julio Cesar denied further attempts.
Striker Luis Suarez nearly scored on a solo run in the 19th minute, dribbling past Brazilian defender Juan and colliding with Julio Cesar, but again Baldassi penalized Suarez, this time with a yellow card.
Irritated fans began to jeer Brazil, and Morumbi echoed with whistles and boos.
But in the final minute of the half, Luis Fabiano raced to the byline and fired in from a tight angle, shooting between Carini's legs to equalize.
Uruguay continued to press forward in the second half, with Suarez beating Gilberto in the opening minute and forcing Julio Cesar to make a diving save.
Dunga tried to bolster his defense by replacing Ronaldinho with defensive midfielder Josue before Luis Fabiano put Brazil ahead on 64 minutes, scoring after Gilberto's shot rebounded.
Uruguay remained on the attack, and a minute later Abreu forced Julio Cesar to make another sensational save. Jorge Fucile fired over the crossbar, and Gilberto Silva barely deflected a shot by Abreu.
"In the second period we tightened our marking and played like we did in the Copa America," Dunga said. "I'm happy with my team. We have to improve, that's logical. But it's not just technique -- it's a moral question. It's attitude."