AP

RIO DE JANEIRO (AP) — Serbia had a late last look against the U.S. and missed.

The Serbs are getting another shot, this time for gold.

Milos Teodosic scored 22 points as Serbia, which pushed the star-studded American squad to the final seconds before losing earlier in the Rio Games, moved into the Olympic final with a shockingly easy 87-61 semifinal win over Australia on Friday.

Stefan Markovic scored 14, Nikola Jokic had 11 rebounds and the Serbs, a squad with a mixture of moxie and muscle, earned another crack at the U.S. on Sunday. The two-time champions buckled down on defense and held off Spain 82-76 in the other semi to advance.

Serbia's win guaranteed its first Olympic medal in men's basketball since gaining independence in 2006. An upset would give it the most precious one.

"I'm not even thinking about the final because we need some time to forget this game and prepare our mind and body and everything for the game against the States," said Teodosic, the Serbs captain who shot 9 of 14 and added five assists. "They are for sure the best team in the tournament, one great team with the big names. We're going to go on the court and try to play our game and we're going to see if it's going to be enough."

The Serbs had more than enough to handle the talented and tough Aussies, who scored just five points in the first quarter, 14 in the first half and failed to secure their first Olympic medal after three fourth-place finishes.

The Aussies, too, were hoping for another crack at the U.S. after a close loss in preliminary play. But they'll now have to beat Spain for their first Top 3 finish.

With five NBA players, Australia brought its most talented team ever to Brazil. A horrendous start negated everything the Boomers had going for them.

"We're going to try to regroup," said Andrew Bogut, who had just four points and one rebound in more than 22 minutes. "We realized the tournament's not over for us. It's disappointing to have that kind of game, but that's tournament basketball. You have one bad game out of seven and you're kind of out."

Running their offense to text-book precision, the Serbs back cut, screened and scared the Americans in pool play before losing 94-91 in perhaps the tourney's most well-played game. Serbia had a chance to force overtime, but guard Bogdan Bogdanovic missed a 3-pointer as time expired.

Serbia lost to the U.S. by 37 in the 2014 FIBA World Cup, but that experience only strengthened this group, which was beaten by 15 against Australia in the opening round.

"Our game was incredibly good and I'm really proud of my team," Teodosic said. "To limit one team like Australia to 15 points in the first half is something amazing, almost impossible, but we did it."

Patty Mills scored 13 for the Aussies, but was only 1 of 9 on 3s. His teammates weren't any better as Australia shot 33 percent from the field, and a head-scratching 13 percent (4 of 31) on 3-pointers.

"It was tough for us to buy a basket and they played really well defensively," guard Matthew Dellavedova said. "We didn't run our offense as well as we can and as well as we have throughout the tournament. When a team has pressured us, we've got counters, but for whatever reason we just didn't get to them."

Following the game, five-time Australian Olympian Andrew Gaze, the second leading scorer in the games' history working in Rio as a TV commentator, summed up the way he and his countrymen were feeling.

"I didn't see that one coming," he said.

Serbia built a 24-point lead in the second quarter on a three-point play by the talented Teodosic, who has become friends with U.S. coach Mike Krzyzewski. The Aussies tried to come back, but whether it was layups, mid-range jumpers or 3s, they just kept missing and missing and missing.

The Serbs had something to do with it and they never let up. During the second half, the Brazilian crowd changed "Ole ... Ole" every time Serbia passed the ball as the frustrated Aussies scrambled trying to stop them.

Serbia may not have as many household names as the Americans, Australians, French or Spaniards. But in Teodosic, the Serbs have one of Europe's best guards and they've got inside muscle with Jokic and Miroslav Raduljica, their tattooed center who left his mark on the Aussies with a few thunderous dunks.

On Sunday, Serbia, an Olympic rookie, will have a shot at toppling the mighty U.S. of A.

"Unbelievable," said forward Nikola Kalinic. "Serbia is a really small country, so it's an even bigger success."