Brazil is still in the running to win its first ever Olympic gold medal in men's soccer — just barely.
Brazil narrowly escaped with a victory against a shorthanded Honduras on Saturday, twice coming from behind to earn a 3-2 win and advance to the semifinals of the men's Olympic football tournament.
Honduras got goals early in each half but could not hold on as the Brazilians played with an extra man from the 33rd minute after defender Wilmer Crisanto was sent off with two yellow cards just a minute apart.
Mario Martinez put Honduras ahead in the 12th before Leandro Damiao equalized in the 38th
Roger Espinoza gave Honduras the lead again in the 48th, but Neymar evened the score by converting a penalty kick in the 50th and Damiao netted the winning goal in the 60th.
Espinoza also was sent off in injury time after a foul on Oscar. He got a standing ovation from the crowd as he left the field, as did the rest of the Hondurans after the match ended.
Brazil's men's team has won four Olympic medals, but none of them were gold. It earned silver in 1984 and 1988, and bronze in 1996 and 2008. It is the only significant football competition the five-time world champions haven't won.
Brazil was in danger of becoming the latest medal contender to leave the Olympic tournament after Spain and Uruguay were eliminated in the group stage.
But Honduras' chances nearly ended when Crisanto was sent off for a hard foul on Neymar. He had received his first yellow card just a few seconds earlier, which had already prompted complaints from the Hondurans.
The crowd of more than 42,000 at St. James' Park got behind Honduras even more after the red card but Brazil was able to take control of the match.
Honduras's early goal came after Wigan defender Maynor Figueroa was hit while trying to get past Brazilian defenders inside the area. The ball ended up with Martinez, who volleyed it into the far corner.
Damiao equalized when Honduras defenders Jose Velasquez and Arnold Peralta failed to clear a cross from Brazil striker Hulk. Damiao took advantage of the indecision in front of the net and slid feet-first to get the ball across the goal line.
It was Espinoza who scored just after the second half started, going past a defender just outside the area and firing a low shot that went in near the far post.
Brazil answered immediately, though, when Damiao was brought down inside the penalty area.
The crowd and the Hondurans were not happy with the call but Neymar struck a firm right-footed shot from the spot to beat Honduras goalkeeper Jose Mendoza.
Damiao scored the go-ahead goal after clearing a defender near the penalty spot after a pass by Neymar.
Honduras still had some chances despite playing a man down, mostly on powerful free kicks taken by Figueroa.
"I think we could've done more if we had 11 players the entire match, but there's nothing we can do about it, that's football," Honduras coach Luis Suarez said. "I never talk about the performance of a referee. They can make mistakes against you one day and in your favor the other. I'm happy about how my team played. Even with 11 players it would've been extremely hard."
Honduras was trying to repeat its stunning victory over Brazil in the 2001 Copa America, when it eliminated Luiz Felipe Scolari's team in the quarterfinals of the South American competition in what was one of Brazil's most shocking defeats ever.
Honduras had already provided a surprise victory in the group stage at the London Games when it beat Spain 1-0, helping eliminate the gold-medal favorite from the tournament played with under-23 squads and three older players per nation.
It was the first time Honduras advanced past the first round in the Olympics. It was eliminated in the group stage in 2000 and 2008, the only other times it participated in the games. The senior team made it to the 2010 World Cup, being eliminated in the first round.
Only two of the starters on Saturday play outside of Honduras — Figueroa and Kansas City Wizards midfielder Roger Espinoza.
Brazil's regular starters returned on Saturday after many were rested in the team's 3-0 win over New Zealand in its last group match, when it had already secured a berth in the quarters.
Brazil was the only team to win all of its three group-stage matches, entering the quarters with the tournament's best attack with nine goals scored.
Based on reporting by the Associated Press.