Well it wasn't pretty, but Team USA men's basketball defeated Spain 82-76 on Friday to advance to Sunday's gold medal game. The final score was a bit closer than the game actually was down the stretch, as the U.S. hovered around a double-digit lead for much of the second half, but Spain never completely went away.

Here are five things to know from Team USA's win.

1. Welcome back, Klay Thompson

Aside from a few possessions in which Klay Thompson was trying to draw a foul by throwing up an impossibly horrible heat-check shot, the Golden State Warriors' shooting guard was a flame-thrower for much of this game. He's been shooting 30 percent from the field and less than 30 percent from deep through the first six games of the Olympics, but he connected on half his shots and half his 3-pointers in the semifinal against Spain to lead Team USA with 22 points.

This is where Thompson can be an overwhelming for the international teams. You have to pay so much attention to Kyrie Irving, and keep you eye on DeAndre Jordan who is always angling for a lob, not to mention the scoring punch of Kevin Durant and Carmelo Anthony (though they haven't exactly been lighting the world on fire), that Klay ends up getting a lot of open looks.

Once he gets hot and you have to rotate to him, the other guys get going. When he's not making his shots, the defense can at least stay honest in other places, which makes Thompson a swing player. Certainly this will be the case in the gold medal game, whether the opponent is Serbia or Australia. If Thompson is hitting his shots early, the U.S. offense become terrifying.

2. DeAndre Jordan takes flight

DeAndre Jordan has had a solid Olympics so far, but he hasn't had a game in which he truly dominated above the rim like you'd expect him to do in international competition. Unfortunately for Spain, Jordan broke through with one of those games that earned him All-NBA First Team honors this past season and dominated the air up there like the prized recruit of a Jimmy Dolan scouting trip. Jordan set a U.S. Olympic record by grabbing 16 rebounds against Pau Gasol and the Spanish frontcourt.

Without Marc Gasol and Serge Ibaka there to help on the boards, Jordan was simply too much for his counterpart. He also scored nine points and blocked four shots in the game, after blocking just two shots the entire tournament. In a game in which DeMarcus Cousins was ineffective and fouled out in the third quarter (more on the backup center in a bit), Jordan's effectiveness from above was needed.

DeAndre Jordan was great Friday, but who's going to step up behind him? USATSI

3. It's all about the D

The defense has been a big problem for Team USA. Paul George has alluded to it in comments and Tom Thibodeau has often looked like he was going to relax after the game by shoving a kitten into an ATM. This game, you saw much sounder defense from Team USA throughout, as they held a pretty good Spanish team to just 39 percent from the field and 31 percent from 3-point range. Players not named Pau Gasol shot just 35.8 percent from the field for Spain.

What changed can be credited a lot to how Jordan protected the paint and was able to be more effective in covering pick-and-rolls, but the team also seemed to communicate much better. Some of this may be due to Spain's older core and the legs not being as fresh as they used to be. That helped the American players chase around screens and survive when they switched on the perimeter. It also helped that point guards like Sergio Rodriguez and Ricky Rubio are poor outside shooters while Juan Carlos Navarro is basically a hologram of himself at this point.

Either way, they can look to this effort and execution on defense as to what helped them carry on to the victory in a tighter game than it should have been down the stretch. The defense made this an easy-ish victory, even though the final score was closer than it appeared.

4. Playing the Prevent

At a certain point in the game, the U.S. stopped attacking aggressively and just played a prevent offense to chew some clock and let the mathematics of what Spain needed to do on offense in a short amount of time decide the game. It wasn't a great strategy and it wasn't a strong way to close the game, but the defense was good enough throughout the contest to make it work. Overall, the U.S. had its worst quarter of the game in the fourth (16 points), but it almost seemed by design because of the clock issue for Spain.

In the final quarter, USA shot just 7 of 20 (35 percent) from the field and turned the ball over three times. They also had a stretch when they were up 78-69 with a little over two minutes left in which they grabbed multiple offensive rebounds, ate up some extra seconds on the game clock in extending these possessions, and ended up scoring inside on a Kevin Durant lay-up to push the lead to 11 with 1:43 left in the game.

Considering Spain had so much trouble grabbing defensive rebounds in this game (U.S. grabbed 43.7 percent of offensive rebounding opportunities), the U.S. banked on its size and athleticism being enough to make this strategy work.

It did, but it may not on Sunday if they're in that position again.

5. DeMarcus or Draymond?

DeMarcus Cousins has struggled with FIBA officiating and it's really compromised his effectiveness. While his presence was too much for the smaller Argentina frontcourt, he couldn't keep his head trying to defend Gasol in the semifinal. It's led to quite a few people wondering why Draymond Green isn't seeing more time at backup center, though Green hasn't found his footing either in limited time.

So why isn't Coach K going with Draymond as the backup center? It might be because he's not into the small-ball thing or it might just be because Green has been terrible during this time. The ball movement isn't coming from him. The scoring isn't happening because he can't make a shot (21.1 percent from the field, 10 percent from deep, 57.1 percent from the free throw line). And while his defense has been fine, it hasn't been anything like what we're used to seeing from him in the NBA.

He struggled mightily trying to defend Nikola Jokic in group play. Going to Green this late in a bigger role could probably work because he's a very talented player, but he wasn't good in the exhibition tour before the Olympics and he hasn't been good in these seven games in Rio. So do you hope he cracks through in the biggest game or do you hope Cousins can stay out of foul trouble?

Or is the answer to go to a frontcourt of Durant, Melo and Paul George? Whatever it is, Coach K will probably stick with Cousins early and hope Jordan has another big game so it's less of an issue.