JOHANNESBURG — As resilient as the United States soccer team was again, falling behind and then catching up, Friday’s 2-2 draw with Slovenia at the World Cup brought mixed feelings: satisfaction with a fierce comeback and disappointment that something greater had been earned but not awarded.

The Americans frantically charged back from a 2-0 deficit at halftime and seemed to go ahead, 3-2, in the 85th minute on a goal that was nullified by a controversial and unexplained foul call from the referee, Koman Coulibaly of Mali.

“I’m a little gutted,” midfielder Landon Donovan said in a television interview before leaving the field at Ellis Park. “I don’t know how they stole that third goal from us. You can’t take away a good goal from a team at the World Cup. That’s disappointing.”

Still, it was a game the United States (0-0-2) could not afford to lose, and it did not. With England’s surprising 0-0 tie with Algeria later Friday, the Americans can reach the second round with a victory Wednesday over Algeria; a tie and an England loss to Slovenia; or a tie and an England tie as long as the Americans maintain their goal-scoring edge over the English.