Berlin: Gabriel Jesus struck the winner as Brazil put memories of their 2014 World Cup mauling by Germany behind them with a 1-0 friendly win in Berlin on Tuesday.
Jesus's first-half goal at Berlin`s Olympic Stadium, packed with a 72,717-strong crowd, saw Brazil end Germany`s unbeaten run of 22 games dating back to their Euro 2016 semi-final defeat by hosts France.
More worryingly for Germany head coach Joachim Loew ahead of their World Cup defence in Russia, his captain Jerome Boateng twisted his right ankle and was forced off in the second half.
The friendly victory gained a measure of revenge for Brazil, whose coach Tite admitted are still haunted by the 7-1 thrashing Germany handed the hosts in the semi-finals of the last World Cup.
"It was a matter of pride, after all that has been written and said," said Brazil defender Thiago Silva.
"This jersey deserves a little more respect. That`s why I`m overjoyed about winning against a big opponent."
Defending world champions Germany are now winless in their last four games after draws against England, France and Spain.
"It was to be expected that Brazil, with their injured soul, played their best team and were highly motivated," said Loew.
"It wasn`t our day. We made too many mistakes, which allowed Brazil to grow in strength and confidence.
"We had a few young players, who will learn from this, but in addition, the body language was not right from some players."
Loew made seven changes from the team which started the 1-1 draw with Spain last Friday and included just two World Cup-winners.
With Thomas Mueller and Mesut Ozil rested, Boateng and Toni Kroos were the only members of the Germany team which routed Brazil nearly four years ago.
Kroos felt some fringe players had blown their chance at a place in Germany`s World Cup squad.
"There were a few players who had the chance to show what they could do, but didn`t take it -- that`s annoying," said the Real Madrid midfielder.
With Brazil star Neymar still sidelined by a foot injury, head coach Tite made just one change -- Fernandinho for Douglas Costa -- from the side which beat Russia 3-0 in Moscow on Friday.
Berlin-born Boateng captained Germany after Sami Khedira failed to recover from a back injury.
Centre-back Boateng was the first to react to an early threat, snuffing out an attack when Paulinho got in behind the defence with 15 minutes gone.
Germany striker Mario Gomez failed to convert a string of half-chances which came his way before Brazil scored after sustained pressure.
The 20-year-old Jesus forced Germany goalkeeper Kevin Trapp to push the ball over the bar just before the winning goal came on 38 minutes.
The Manchester City forward met Willian`s cross, and Trapp could only parry his header which looped over the line.
After the break, Brazil had two chances in quick succession as Paulinho and Willian were denied by Trapp.
Philippe Coutinho fired over on 56 minutes as the Selecao kept the pressure on.
Jesus should have scored his second of the game when he headed just wide when the ball bobbled loose from a corner.
Loew added a second striker for the final 10 minutes when RB Leipzig forward Timo Werner replaced Ilkay Gundogan as Germany finished strongly, but to no avail.