A gritty performance from Northern Ireland was not enough to deny Germany a first win of their 2026 World Cup qualifying campaign.
The under-pressure hosts were given a seventh-minute lead through Serge Gnabry but, on a nervy night in Cologne, Isaac Price's volleyed finish 11 minutes before half-time pegged back Julian Nagelsmann's side.
Northern Ireland held out until the 69th minute when Nadiem Amiri capitalised on some rare confusion at the back for the visitors before a curling free-kick from Liverpool's Florian Wirtz made it 3-1.
Coming in off the back of three defeats, the most recent of was Thursday's 2-0 loss in Slovakia to open their Group A campaign, Germany could not have hoped for a better start.
A heavy touch by centre-back Eoin Toal allowed Newcastle United's new signing Nick Woltemade nip in and steal the ball before putting Gnabry through on goal.
Goalkeeper Bailey Peacock-Farrell, earning his 50th Northern Ireland cap, had no chance of stopping the Bayern Munich man's composed finish.
The visitors took time to adjust to Germany's direct attacking style with Gnabry and Jamie Leweling both almost getting in behind from early balls forward.
Paddy McNair had to be alert to stop Woltemade getting a shot away with the San Diego FC man then having his side's first chance when he headed over from a corner on the half-hour mark.
It was from another corner four minutes later that Price was left unmarked six yards out and he fired Justin Devenny's delivery into the roof of the net.
David Raum had a goal disallowed for offside before the break, but Northern Ireland finished the half stronger with Shea Charles increasingly prominent.
As the pressure on the Germans ramped up, Leweling's rising effort just before the hour-mark was their first real sight of goal in the second-half.
Seemingly lifted, Germany forced Peacock-Farrell into a swift double-save before Waldemar Anton headed over from a corner.
The visiting keeper then made a brilliant instinctive save from Wirtz but, with 22 minutes remaining, he then left a hopeful long ball only to see substitute Amiri nip in and tap home into an empty net.
Three minutes later, Wirtz curled in a brilliant free-kick to make the game safe for Germany.