Rio de Janeiro: Brazil captain Neymar blasted his first goal of the Olympics to edge the hosts closer to a first football gold medal in a bruising 2-0 quarter-final win over Colombia.
The Barcelona star curled home an exquisite free-kick after just 12 minutes, but was lucky to stay on the field when he chopped down Andres Roa, sparking a brawl between both sets of players and coaches.
Brazil kept their cool, and a fourth clean sheet in four Games matches, as Luan's dipping effort eight minutes from time set up a semi-final meeting with Honduras in Rio on Wednesday.
Germany remained on course for a mouthwatering rematch with Brazil in next Saturday's final, two years on from their 7-1 thrashing of the hosts at the 2014 World Cup, by disposing of Portugal 4-0 in Brasilia.
Brazil edged the latest instalment of a bad-tempered trilogy with South American rivals Colombia in Sao Paulo with Neymar the focus of attention for good and bad reasons.
Neymar missed the Germany semi-final two years ago. He left the field in tears on a stretcher with two broken vertebrae to bring his home World Cup to a cruel end when Brazil dumped a James Rodriguez-inspired Colombia out of a bruising quarter-final that included 54 fouls.
Colombia got their revenge by ending Neymar's tournament prematurely once more at last year's Copa America, this time through suspension. The Brazilian lost his head at the end of a 1-0 defeat and aimed a head-butt at Jeison Murillo provoking a four-game ban.
Neymar finally got off the Olympic mark when he curled home a free-kick from 25 yards.
However, his history with the Colombians sparked clashes just before the break when he viciously kicked Roa from behind. He got only a yellow card.
Brazil controlled the game after the break and sealed their place in a third consecutive Olympics semi-final when Luan's effort dipped over Cristian Bonilla seven minutes from time.
Honduras lie in wait in the last four as they stunned South Korea 1-0 thanks to Alberth Elis's brilliantly taken solitary goal decided their clash in Belo Horizonte.
Germany were in ominous form as Arsenal's Serge Gnabry became the Olympics' top scorer and ended Portugal's hopes of adding gold to a glorious 2016 after winning the European championships last month.
"I'm not surprised. I have said from the beginning with more games the better we will get as a team," said Gnabry.
The 21-year-old has been a player reborn in Brazil after a couple of years blighted by injury and lack of first-team opportunities at Arsenal.
Gnabry scored his sixth goal in four games when he coolly slotted home Julian Brandt's inch-perfect pass to open the scoring in first-half stoppage time.
Mathias Ginter, Davie Selke and Philipp Max added second-half goals as Germany exacted revenge for a 5-0 hammering at the hands of Portugal in last year's under-21 European championships.
Next up for Germany is a semi-final with Nigeria in Salvador on Wednesday. The Africans overcame Denmark 2-0 thanks to goals from Chelsea's John Obi Mikel and Aminu Umar.
Gold medallists in 1996, Nigeria have reached the last four despite organisational chaos off the field.
The players had threatened to boycott the quarter-final over unpaid allowances, whilst coach Samson Siasia has suggested he could quit, claiming he hasn't been paid his salary "for the past five months."
"We have been disrespected from all angles - by the sports ministry, the Nigeria Football Federation. Is that how you will treat your own children? We are not street kids," said Siasia.
Nigeria arrived in Brazil just hours before their opening 5-4 win over Japan last week after being stranded for several days at their training base in Atlanta because the federation had not booked flight tickets in advance.
"With the problems we have had, getting to this stage is just absolutely amazing and we just have to keep going," said Mikel.