Substitute Patrick Schick glanced home an injury-time equaliser to preserve Bayer Leverkusen’s remarkable unbeaten record and hand his side control of their Europa League last-16 tie against FC Qarabag.
The Bundesliga leaders looked like giving up their run of 34 matches unbeaten in all competitions when they went in 2-0 down at half-time in Baku, Juninho setting up the first and scoring the second with a silky piece of skill.
But Alonso, who had made eight changes to his starting XI, turned to his bench for inspiration and was rewarded as Florian Wirtz scored a delicate chip and Schick nodded in from close range in added-time.
It was a cruel finish for the Azerbaijani side, who lost twice to the same opponents in the group stages, but a further reminder of the resolve that Leverkusen have developed during a revelatory campaign.
Only Jonathan Tah, Robert Andrich and Alex Grimaldo survived the weekend win over Cologne and Qarabag took their chance to assert themselves in a lively start.
After forging three good chances in quick succession they deservedly took the lead in the 26th minute, Juninho robbing Tah on the press before cutting back across the box for Yassine Benzia. His powerful finish thudded into the roof of the net as the hosts turned up the heat.
The Germans were slow to respond, allowing Leandro Andrade a free header at the far post, and could have no complaints when they conceded again. This time it was brilliance from Juninho, who collected a beauty of a pass to spring the offside trap and race through one on one with Matej Kovar. With the deftest of touches he dragged the ball across the keeper, bouncing it over him with a kick off the pitch and leaving an open net to tap into.
Jeremie Frimpong, Granit Xhaka, Wirtz and Schick were all summoned for the rescue job and it was a much improved Leverkusen who hit back when Wirtz produced an inch-perfect lob in the 70th minute.
Kovar made a strong save from Juninho to keep the scoreline down and the ruthless visiting side hit their sucker punch just as time was running out, Schick planting Andrich’s cross into the bottom corner.
Leverkusen almost turned a draw into a win when Frimpong put a last-gasp header wide and will fancy themselves to finish the job on home soil.