Disappointed yet again, the Brazilian fans jeered their own team and saved their applause for Iraq.
Brazil, which has never won the Olympic gold medal in men's soccer, failed to win for the second consecutive game, held to a 0-0 draw by the Iraqis on Sunday.
The result leaves Brazil tied for second place in Group A. The team needs a victory over Denmark on Wednesday in Salvador to advance and avoid another huge embarrassment at home two years after the 7-1 loss to Germany in the World Cup semifinals.
"We need to apologize to the fans, to the people of Brasilia," Brazil coach Rogerio Micale said. "We didn't play our best football. We feel like we left our fans frustrated."
Neymar, the tournament's biggest star, played below expectations for the second straight game, and promising young strikers Gabigol and Gabriel Jesus also struggled.
Voicing their frustration, the fans chanted "Marta, Marta" in reference to the five-time world player of the year who has been thriving with the women's national team.
And as the Iraqis rejoiced on the field after the draw, the fans applauded the team and broke out into chants of "Iraq, Iraq."
"It's a historic day for Iraq to be able to draw against Brazil at its home," Iraq coach Abdulghani Alghazali said. "It's a great achievement for Iraqi football."
One of Brazil's best chances of the match fell to midfielder Renato Augusto in second-half injury time, but his volley from close range sailed over the crossbar with the goalkeeper already beaten.
"As the time passes and we can't score, the anxiety increases, and in this situation it's easier to make mistakes," Micale said. "It's natural."
In other games, Nigeria became the first team to advance to the quarterfinals by beating Sweden 1-0 in the jungle city of Manaus, earning the spot in the knockout round despite arriving in Brazil just hours before its opening game because of a travel mix-up.
Portugal moved close to the quarterfinals by beating Honduras 2-1 in Rio de Janeiro, while defending champion Mexico defeated Fiji 5-1 in Salvador with four goals by midfielder Erick Gutierrez. Argentina topped Algeria 2-1 in Rio for its first win, while Germany scored late in a 3-3 draw against South Korea in Salvador.
Denmark, Brazil's next opponent, defeated South Africa 1-0 earlier Sunday in Brasilia. It had opened with a scoreless draw against Iraq.
Brazil is trying to win its first gold medal in soccer and it arrived for Sunday's match under pressure after a disappointing 0-0 draw in the opener against South Africa.
The crowd of more than 60,000 started supporting Brazil but it grew anxious as the team struggled against Iraq, jeering the players at halftime and more and more toward the end of the match.
Gabriel Jesus, who last week secured a multimillion-dollar transfer to Manchester City, missed a few decent chances early and was loudly booed when he was substituted in the second half.
Brazil also had a goal by Gabigol disallowed in the 28th because of offside, and Augusto hit the crossbar with a shot just before halftime.
Soccer is the only competition played outside Rio. The other host cities are São Paulo, Salvador, Brasilia, Belo Horizonte and Manaus. The tournament began two days before the opening ceremony, and the men's final will be Aug. 20 at the Maracanã Stadium.