TIANJIN, China — The United States was within seconds of a major win and a quarterfinal berth in men's Olympic soccer. Now it's a tie away.

The Americans allowed a goal on a free kick by Gerald Sibon in the third minute of injury time, forcing them to settle for a 2-2 tie with the Netherlands on Sunday night and swallow a lot of frustration.

"We were very close to being in the quarterfinals, and now we are very far," U.S. coach Peter Nowak said. "Before the game, nobody gave us a chance. And I think we played pretty good. You can look at his as half empty or half full."

The result left the United States with four points, tied atop Group B with Nigeria and two ahead of the Netherlands. Japan has zero. Only two teams advance.

The U.S. team faces off against the Nigerians on Wednesday in the final group game for both in Beijing. The Dutch will need a victory against Japan while the United States, with a superior goal difference to Nigeria, will require only a tie to advance.

"I'm still really bummed," U.S. midfielder Robbie Rogers said. "That's the best I've seen us play."

The Americans fell behind in the 16th minute on a goal by Ryan Babel, but made a tactical change soon afterward and began to control the match.

Sacha Klejstan and Jozy Altidore scored eight minutes apart to give the United States a 2-1 lead by the 72nd minute.

Klejstan tied the game in the 64th minute, running onto a through ball from Freddy Adu, cutting inside and turning defender Kew Jaliens before blasting a right-footed shot past goalkeeper Kenneth Vermeer.

"When I scored that goal, we went and picked it up," Klejstan said. "Our confidence just continued to grow."

Eight minutes later with the Americans pressing again, the ball squirted wide left to defender Michael Orozco, who drove it back across the penalty area and Altidore knocked it in with his right knee.

But as the game wore on and the Dutch saw their Olympic chances dwindling, caution was no longer an option.

Sibon entered the game in the 75th minute with fellow forward Roy Makaay, who injured his foot in the Netherlands' 0-0 draw with Nigeria on Wednesday and initially was reported to be unavailable.

The United States fought off all chances until the Dutch earned a free kick 25 yards from goal, and Jonathan de Guzman and Urby Emanuelson were unsure who should take it.

"When I came in, they said they weren't sure, and so I said 'I'll take it,"' Sibon said. "You just blast it on goal and see where it lands."

Sibon's low drive eluded goalkeeper Brad Guzan to send the Dutch to its game against winless Japan with renewed hopes of reaching the quarterfinals.

"If you look at the replay, it goes right under the wall," Guzan said. "Unfortunately, we were the better team for 70 minutes. We let two points get away from us.

"After tonight, we'll put this behind us. We'll go to Beijing looking for a win. You don't go into these games looking for a draw, or looking to score 'x' amount of goals. We're completely confident."