SHANGHAI -- Team USA needed a foul with 0.1 seconds left in the fourth quarter, four missed free throws in overtime that will go down in infamy in Turkish basketball history, and a few fortunate bounces to avoid a loss in the FIBA World Cup Tuesday.

But the U.S. also needed heroics, poise, togetherness and luck to put together a 93-92 win over Turkey to extend its winning streak to 44 games in major competitions and assure itself of advancing to the event's second round.

You'll have to choose whether you saw it as good news or bad news, but the Americans made up their minds quickly. Despite struggling with the No. 17 team in the world and very nearly losing after a zone defense brought their attack to a halt, Team USA was thrilled it was able to stay composed and pull the victory out, one it will remember for a long time.

"It was anybody's game; we will accept the win, but it was anybody's to win," coach Gregg Popovich said. "We have to get better than that, but playing a fine team like that gives us another example of how good it can be when everybody knows what they're supposed to be doing on the court."

USA's Kemba Walker goes to the basket as Turkey's Ersan Ilyasova tries to block his shot at the FIBA World Cup. Hector Retamal/AFP/Getty Images

Khris Middleton was a hero, making two free throws with 2.1 seconds left in OT to get the win. He was set up on the play by Jayson Tatum, who made 2-of-3 free throws at the end of regulation to extend the game, even as Tatum rolled and sprained his left ankle after making the vital pass that ended up with Middleton drawing a foul.

That the U.S. won on the foul line was bitter for Turkey as Cedi Osman, who plays for the Cleveland Cavaliers, and Dogus Balbay each missed two free throws with nine seconds left in OT. The Americans looked like they were done after a turnover and intentional foul gave Turkey a golden chance to finish the game right now. Osman, who did make some big plays otherwise, also fouled Tatum at the end of regulation on a 3-pointer that gave the U.S. life.

"I'm very sad but I congratulate them," said Turkish coach Ufuk Sarica. "We could've won tonight two times, three times maybe ... It really hurts, you know. When the game goes to overtime I think it was in our hands, not their hands."

Middleton finished with a team-best 17 points. Tatum, who was able to leave the Shanghai Sports Arena under his own power and will be reevaluated Wednesday, had 11 points and 11 rebounds, some of them ripped from Turkey in brawl-like scrums.

Kemba Walker was also due much praise. Though he had an off shooting night, going 5-of-14, Walker was brilliant in overtime as he scored five of his 14 points and came up with a steal and took a charge to end a Turkey possession. He was credited with three steals, but the statisticians might have missed a couple.

Walker, who hasn't played in many high-pressure games like this since his college days at UConn, reveled in the victory. He and other U.S. players hugged, slapped backs and smiled off the floor. This was not an elimination game, and there are some glaring weaknesses showing. But unlike other Team USA groups that tended to focus on the pressure of constant domination, this group is continuing to enjoy the process.

"That was an incredible game to be a part of," Walker said. "At the same time, there is so much room for improvement. We have a bunch of young guys, we're a new team, we're still learning. We're still learning each other. But I think tonight, that win, it's going to help us, you know, take this team to another level."

Long-term, though, the worries that existed over the last few weeks are coming to fruition. In addition to losing Tatum for at least a short while, it was exactly the type of game the Americans feared.

Their offense tightened up and stagnated when Turkey dropped into zone, a thorn in American sides for decades and definitely a sign of lack of cohesion and trust for a new team. Instead of passing through it as their plan was, instead the U.S. players tried to drive into it. Turkey had good size inside and its effect on Team USA was jarring. Walker, Tatum and Donovan Mitchell -- Team USA's core scorers -- went just 8-of-32 shooting in regulation.

Over and over, various American players drove into traffic and were unable to finish over bodies in red uniforms. And it wasn't like they were getting swatted. Turkey didn't record its first block until late in the third quarter when Team USA was already a woeful 7-of-23 on 2-point shots, most of those coming in the paint. When it was over, they shot 13-of-37 inside the 3-point arc, which would typically be an unsurvivable number.

With the game in the balance in the final minute of the fourth quarter, Popovich was so unsure of his big men that he took them all off the floor and left undersized Tatum and Middleton to play center. Ersan Ilyasova, a power forward in the NBA but taller than any American, made back-to-back baskets, including a putback.

Regardless of the strategy to take out center Myles Turner, who had some positive moments, it was a sign of how insecure Popovich is about that area of his roster.

It was also telling that the U.S couldn't get a fifth foul on Ilyasova, Turkey's best player, even as he played the game's last nine minutes with four fouls. They just didn't have the ability to go at him as he finished with 23 points.

"I think tonight was a great lesson for us, just in terms of we got lucky," said Harrison Barnes, who finished with 10 points. "We keep playing like that, we're not going to get to where we want to be."

Turkey truly bothered the Americans with their interior size, challenging shots vigorously and walling off the rim. This was a known issue for this team coming in as their primary penetrators, Mitchell and Walker, lack size. But it wasn't expected that Turkey, which doesn't have rock star interior defenders, would be the team to grind the U.S. to a halt.

This is going to be an issue later in the tournament, especially if the U.S. ends up facing top challenger Serbia. That team is genuinely massive, with four talented players 6-10 or taller: Nikola Jokic, Boban Marjanovic, Nemanja Bjelica and Miroslav Raduljica. Serbia has outscored its opposition by 105 points in the first two games and is shooting a preposterous 70%.

Right now, though, thinking about Serbia is probably irresponsible, as the U.S. has to try to piece together some offensive rhythm. The Americans will mostly likely handle Japan, the weakest team in their pool, on Thursday. But starting in the second round it's more talented teams like Turkey, namely Brazil and Greece, who played a classic game themselves on Tuesday.

But the Americans weren't worrying about it as they went into the Shanghai night. They had decided this win was going to be a stepping stone. Plus they were still in awe they somehow pulled it off.

"It was one of the best damn basketball games I've ever been a part of," Turner said. "I think any team can see this game and know that this is a team that their licking their chops to play. We're Team USA, everybody wants to beat us. Every team is going to give us their best shot. More than anything, we have to just stay together."