Maribor came from a goal behind to beat Rangers thanks to Etien Velikonja's stoppage-time back-heel in the first leg of their Europa League first leg.
The Scottish champions looked to be comfortably in control when Juan Manuel Ortiz turned in a Kirk Broadfoot cross after 31 minutes.
But Slovenia's top side burst into life when Agim Ibraimi fired past Allan McGregor seven minutes after the break.
And Dejan Mezga set up substitute Velikonja to grab a late advantage.
It was just about what the Slovenian champions deserved for a fine second-half fightback that leaves the Glasgow side with an uphill task in the second leg at Ibrox.
Rangers manager Ally McCoist had gambled with the fitness of Lee McCulloch as the Scotland international shook off injury to make a surprise start in midfield in place of Jamie Ness.
And McCoist literally played his wild card, with Carlos Bocanegra, signed 24 hours earlier from St Etienne, replacing the injured Kyle Bartley in defence after a hectic overnight dash from France.
The strains of the journey, or perhaps the unfamiliarity with his new team-mates, appeared to have told on the United States international when he was exposed twice within the opening minutes.
Ales Mertelj forced goalkeeper McGregor to push a 16-yard drive wide after Bocanegra was dispossessed on the halfway line then Dalibor Volas beat him for pace but fired over from just outside the penalty box.
Rangers worked their way into the game and Nikica Jelavic had two efforts blocked in front of goal and then fired straight at goalkeeper Jasmin Handanovic on the turn.
Broadfoot was finding plenty of space down the Maribor left and, after turning inside his marker, his low cross was turned into the net by Ortiz from six yards to put Rangers into a deserved lead.
It looked like Rangers would run away with the game as they began to create more chances.
However, Maribor, who were without Brazilian striker and captain Marcos Tavares through injury, exerted some pressure of their own as the first half drew to a close and Mezga curled a 20-yard free-kick just wide.
McCoist replaced Steven Naismith, who had been booked in the first half and came close to a second yellow card, with Kyle Lafferty, himself being a surprise addition to the bench after recovering from long-term injury.
The game swung thereafter in Maribor's favour and they drew level when Macedonian international Ibraimi picked the ball up from a throw-in and fired in a left-foot strike from 20 yards, beating McGregor at his near post.
The Slovenians sensed they now had the upper hand and, from the goalscorer's driven crosses, Robert Beric headed wide then Dalibor Volas forced McGregor into a good block.
Mezga sent another free-kick just wide of the Rangers post as the game began to open up and flow from one end to the other.
It was the same man who set up the winner with a mazy run and cross to complete a turnaround that looked unlikely at half time.