Velikonja (left) scored in stoppage time for Maribor
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.
Ortiz had put Rangers ahead by half time in Slovenia
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.
Headed effort from deep inside the penalty area by Dalibor Volas goes harmlessly over the crossbar.
The offside flag is raised against Robert Beric. Allan McGregor takes the free kick.
The referee gives a free kick against Nikica Jelavic for handball. Direct free kick taken by Jasmin Handanovic.
Inswinging corner taken by Steven Davis.
Shot by Maurice Edu from just outside the area goes over the net.
Dalibor Volas takes a shot. Save by Allan McGregor.
Close range effort by Kyle Lafferty clears the crossbar.
Unfair challenge on Robert Beric by Steven Davis results in a free kick. Agim Ibraimi restarts play with the free kick.
Unfair challenge on Robert Beric by Carlos Bocanegra results in a free kick. Direct free kick taken by Dejan Mezga. Agim Ibraimi takes a shot. Blocked by Lee Wallace.
Foul by Zeljko Filipovic on Lee McCulloch, free kick awarded. Carlos Bocanegra restarts play with the free kick.
Direct free kick taken by Lee Wallace.
Booking Ales Mejac receives a caution for unsporting behaviour.
The assist for the goal came from Dejan Mezga. Ales Mejac challenges Maurice Edu unfairly and gives away a free kick.
51:35 Goal scored
Goal! - Agim Ibraimi - NK Maribor 1 - 1 Rangers Agim Ibraimi finds the net with a goal from inside the box to the bottom right corner of the goal. Maribor 1-1 Rangers.
Inswinging corner taken by Steven Davis.
Carlos Bocanegra challenges Dalibor Volas unfairly and gives away a free kick. Free kick taken by Ales Mertelj.
The referee gets the second half started.
Substitution Kyle Lafferty on for Steven Naismith.
45:00 +1:22 Half time
Half Time The whistle is blown to end the first half.
Free kick awarded for an unfair challenge on Agim Ibraimi by Kirk Broadfoot. Direct free kick taken by Soares Arghus. Palazon Juanma Ortiz concedes a free kick for a foul on Ales Mejac. Free kick taken by Ales Mejac.
Free kick awarded for an unfair challenge on Steven Naismith by Mitja Viler. Direct free kick taken by Dorin Goian.
Free kick awarded for an unfair challenge on Agim Ibraimi by Steven Naismith. Dejan Mezga produces a strike on goal direct from the free kick, Allan McGregor makes a comfortable save.
Free kick awarded for a foul by Carlos Bocanegra on Dalibor Volas. Ales Mertelj restarts play with the free kick.
Maurice Edu concedes a free kick for a foul on Mitja Viler. Shot on goal comes in from Dejan Mezga from the free kick.
Free kick taken by Agim Ibraimi.
Booking Steven Naismith goes into the book for unsporting behaviour.
Free kick awarded for an unfair challenge on Mitja Viler by Steven Naismith.
Soares Arghus concedes a free kick for a foul on Nikica Jelavic. Steven Davis takes the direct free kick.
Nikica Jelavic takes a shot. Save by Jasmin Handanovic.
Kirk Broadfoot provided the assist for the goal.
30:10 Goal scored
Goal! - Juanma Ortiz - NK Maribor 0 - 1 Rangers Palazon Juanma Ortiz finds the back of the net with a goal from close range to the bottom left corner of the goal. Maribor 0-1 Rangers.
Nikica Jelavic takes a shot. Save made by Jasmin Handanovic.
Foul by Soares Arghus on Nikica Jelavic, free kick awarded. Free kick taken by Steven Davis.
Short corner worked by Agim Ibraimi.
Robert Beric is ruled offside. Free kick taken by Carlos Bocanegra.
Free kick awarded for an unfair challenge on Kirk Broadfoot by Agim Ibraimi. Kirk Broadfoot takes the free kick.
Free kick awarded for an unfair challenge on Mitja Viler by Steven Naismith. Mitja Viler restarts play with the free kick.
Agim Ibraimi takes a shot. Kirk Broadfoot makes a clearance.
Agim Ibraimi takes a shot. Lee Wallace makes a clearance.
Lee Wallace gives away a free kick for an unfair challenge on Dejan Mezga. Free kick taken by Agim Ibraimi.
Outswinging corner taken right-footed by Kirk Broadfoot from the right by-line. Nikica Jelavic takes a shot. Aleksander Rajcevic gets a block in.
Nikica Jelavic has an effort at goal from outside the area which misses left.
Effort on goal by Dalibor Volas from just outside the penalty area goes harmlessly over the target.
Corner taken by Lee Wallace, Jasmin Handanovic fouled by Maurice Edu, the ref awards a free kick. Free kick taken by Jasmin Handanovic.
Dalibor Volas crosses the ball.
Nikica Jelavic takes a shot from just outside the penalty area which clears the crossbar.
Dalibor Volas takes a shot. Save made by Allan McGregor.
This page is best viewed in an up-to-date web browser with style sheets (CSS) enabled. While you will be able to view the content of this page in your current browser, you will not be able to get the full visual experience. Please consider upgrading your browser software or enabling style sheets (CSS) if you are able to do so.