BERLIN (AP)Giannis Antetokounmpo got ejected, and Greece’s hopes of bringing home a European championship ended not long afterward.

Germany, meanwhile, is taking full advantage of its home-court edge.

Dennis Schroder scored 26 points, Daniel Theis had a 13-point, 16-rebound effort and host Germany moved into the EuroBasket semifinals with a 107-96 win over Greece on Tuesday.

Antetokounmpo had a monster game for Greece – 31 points, eight assists and seven rebounds in 30 minutes. But he also picked up two unsportsmanlike conduct fouls, the last of those leading to his ejection with 4:56 left.

Greece was down by 14 when he committed his second such foul, and Germany maintained full control the rest of the way.

Germany now has a chance at what would be just its second medal in its last 13 appearances at EuroBasket. The Germans won the European title in 1993 and were second in 2005; assured of no worse than fourth now, this tournament will mark their best EuroBasket finish since that silver-medal showing.

”I think this is unbelievable for German basketball, the way this team, the way these players have performed on their home soil up to now,” Germany coach Gordie Herbert said. ”I think the way they’ve played, the way we’ve played, people can relate to. They see an identity.”

Greece and Serbia were the only two teams that made it through the group stage of EuroBasket with unbeaten records, both 5-0 and led by a pair of two-time NBA MVPs – Antetokounmpo for Greece, Nikola Jokic for Serbia.

Then came the knockout stage, and the records no longer mattered. Serbia and Jokic were ousted in the round of 16 by Italy; Antetokounmpo and Greece are now gone as well.

”We really enjoyed the ride,” Greece coach Dimitrios Itoudis said. ”We really enjoyed the journey. I think that we made a lot of people proud with the way that this team performs. We wanted to go more, but it didn’t happen this time.”

Giannoulis Larentzakis scored 18 points on only five shot attempts for Greece; he was 5 for 5 from the field, four of those from 3-point range, and was 4 for 6 from the foul line. Tyler Dorsey added 13 for Greece.

Franz Wagner and Andreas Obst had 19 points apiece for Germany, which plays Spain in Friday’s semifinals.

”It was a really physical game,” Wagner said. ”A lot of points. We found our rhythm really early and I think we did a way better job collectively guarding them in the second half.”

SPAIN 100, FINLAND 90

Most of the names on Spain’s national team have changed in the last year, with the roster that headed to EuroBasket significantly different from the one that played in the Tokyo Olympics.

The expectations, however, remain the same.

Willy Hernangomez scored 27 points, Juancho Hernangomez added 15 and Spain – with just three players who got any significant playing time at the Tokyo Games last summer – powered into the semifinals by erasing a 15-point deficit and topping Finland in Tuesday’s first quarterfinal.

Down 50-35 late in the final half, Spain outscored Finland 65-40 over the game’s final 21 minutes.

”We showed, one more time, cohesiveness, toughness, generosity, we shared the ball well,” Spain coach Sergio Scariolo said. ”At the end of the day, this is what you can ask to a team which is so inexperienced and so new in this kind of engagement.”

Spain reached the EuroBasket semifinals for the 11th consecutive time and will play Germany on Friday for a spot in the final.

Dario Brizuela scored 14 points, Rudy Fernandez added 11 and Lorenzo Brown had 10 for Spain.

”It was a hard battle,” said Willy Hernangomez, Juancho’s older brother. ”Tough battle for us. … Our first half was really bad. We started the game not with the right mentality. And then at halftime, (we said) we’ve got to be us, we’ve got to be us.”

Spain opened the third quarter on a 17-5 run, more than setting the tone for its comeback.

Lauri Markkanen scored 28 points and grabbed 11 rebounds for Finland, while Mikael Jantunen scored 13, Alexander Madsen had 13 and Sasu Salin added 11.

Finland was seeking its first trip to the EuroBasket semifinals.

”Well, you see why Spain is always so tough,” Finland’s Shawn Huff said. ”They never give up. We gave it a good shot.”

WEDNESDAY’S SCHEDULE

The other two quarterfinal games are on tap: France plays Italy, and defending champion Slovenia takes on Poland.

More AP sports: https://apnews.com/hub/sports and https://twitter.com/AP-Sports