(CNN) -- Ludogorets Razgrad may only have been founded 13 years ago but on Wednesday it stood on the brink of the biggest result in its brief history.
The Bulgarian club, transformed by multi-millionaire businessman Kiril Domuschiev, stood a mere 13 minutes away from a draw with European champions Real Madrid.
In front of a packed National Stadium in the Bulgarian capital of Sofia, the Spanish side's superstars -- including Cristiano Ronaldo, James Rodriguez, Gareth Bale -- were on the verge of a major embarrassment.
But Carlo Ancelotti's side aren't Champions League holders for nothing and France striker Karim Benzema got them out of jail in the nick of time with a goal that sealed a 2-1 win.
The minnows had gone ahead, Marcelinho converting from a corner after just 6 minutes to send an already excited crowd into raptures.
Just four minutes later Javier Hernandez -- on loan from English club Manchester United -- won a penalty but Ronaldo's effort was saved by Vladislav Stojanov.
Ironically, it was defender Cosmin Moti who gave the Portuguese the chance to make amends 15 minutes later after bringing down the world player of the year inside the area.
Moti had been Ludogorets' hero when it made the group stage, going in goal after its goalkeeper was sent off and saving two penalties against Romania's Steaua Bucharest in the playoff.
But Moti could only watch on as Ronaldo found the bottom corner to restore parity.
Ludogorets gave as good as it got in an open second half but just as it looked as if the match was destined for a draw, Benzema finished neatly from a right wing cross.
The other match in Group B saw English Premier League club Liverpool beaten 1-0 by FC Basel in Switzerland.
Marco Streller scored the only goal of the game, pouncing on a loose ball inside the penalty area to slot into the roof of the net from close range.
Raheem Sterling wasted Liverpool's best chance while striker Mario Balotelli was again kept quiet.
Captain Steven Gerrard told Sky Sports: "They wanted it more and we were second best against an OK team. We made it easy for them. We wanted at least a draw and I expected us to win so I'm very disappointed."
Danny Welbeck notched his first hat-trick in Arsenal colors as the Gunners thumped Turkish side Galatasaray 4-1 at Emirates Stadium in London.
The striker, signed by Arsene Wenger from Manchester United on transfer deadline day, struck first on 22 minutes after a through ball from another new recruit -- Alexis Sánchez, signed from Barcelona.
Poor defending from the Turks allowed Welbeck to double his tally eight minutes later, as he raced onto a misplaced header from Felipe Melo and finished into the bottom corner.
Sanchez ensured Arsenal went into the break leading by three as he cut inside and found the same corner Welbeck had moments earlier.
And England forward Welbeck completed his first treble for his new club with a neat finish on 52 minutes, dinking the ball over Fernando Muslera from Alex Oxlade-Chamberlain's pass.
Arsenal were reduced to 10 men when goalkeeper Wojciech Szczesny brought down Burak Yilmaz in the area, the striker slotting home from the spot after substitute David Ospina had come on.
Webeck told Sky Sports of his first senior hat-trick: "The manager has shown a lot of faith in me and I'm delighted to repay him.
"I'm playing up front in my favored position and I'm going to do everything I can to help the team."
Wenger, celebrating his 18th anniversary as Gunners boss, added of the striker: "It was a great performance -- he has the instinct of a goalscorer and finished well the work of the team."
Elsewhere, a double from Adrián Ramos helped German outfit Borussia Dortmund to a 3-0 victory over Anderlecht in Belgium, Ciro Immobile grabbing the other goal.
A late goal from Arda Turan sealed victory for Spanish champions Atletico Madrid over Juventus. It was the first goal the Italian champions had conceded this season.
Hakan Calhanoglu, Stefan Kiessling and Son Heung-Min got the goals as Bayer Leverkusen defeated Benfica 3-1 in Germany.
A double from Markus Rosenberg helped Malmo to a 2-0 victory over Greek club Olympiakos in Sweden, while French side Monaco and Zenit St Petersburg drew 0-0 in Russia.