Germany defeated Australia 3-2 in Group B of the 2017 Confederations Cup in Sochi, Russia, on Monday.
Lars Stindl began the scoring for the world champions in the opening minutes, but Tomas Rogic equalised just before half-time.
However, Julian Draxler stroked home a penalty just seconds later to regain the lead, as Leon Goretzka made it 3-1 after the restart for the second half.
The Socceroos were not beaten, though, and grabbed their second through Tomi Juric after 56 minutes.
Australia battled hard to find an equaliser, but the German defensive line remained intact.
Australian goalkeeper Mathew Ryan, recently signed by Premier League new boys Brighton and Hove Albion, began the game as his side presented a back three. Tim Cahill only started on the bench as Rogic was handed attacking responsibilities.
The Germans brought a strong but youthful squad to the competition, with Sandro Wagner and Lars Stindl leading the line for coach Joachim Low.
It didn't take long for Germany to earn the lead as Stindl found the back of the net in the opening moments.
The player claimed his first international goal as he slammed home Julian Brandt's cross after a dashing run.
The Socceroos appeared out of their depth as Germany dictated the flow and movement, and it appeared a second strike would soon materialise.
However, it was the Aussies who claimed a goal back as Rogic scored from a rebound after his initial shot fell back at his feet.
Their delight did not last long as Goretzka was fouled in the box by Massimo Luongo, allowing Draxler to score from the spot to regain the advantage before half-time.
Draxler was impressive as he displayed his range of forward play, proving he is now one of the most exciting players in Europe.
The Germans were quickly on the front foot in the second half as Goretzka took his effort at the near post with precision to make it 3-1 after 48 minutes.
Low's team were adamant to control the match from the attacking positions, but the Australians remained optimistic about their chances.
They were rewarded for their endeavour eight minutes later as Juric doubled the Aussie goal tally.
The ball ricocheted in the Germany box, falling to the Australian to slot home with ease past goalkeeper Bernd Leno.
The Germans quickly closed the door on a comeback and protected their defence as they went hunting for a fourth.
However, Australia were a credible match for them but could not find the attacking prowess needed to earn an equaliser in the closing stages.
It was an average performance by Germany who only did what was required to take the victory in their opening match in Russia, and they will struggle against better sides in their current form.