Steven Davis' late strike handed Rangers a much-needed lifeline in their Champions League third-round qualifier, losing the first leg 2-1 at Malmo.
Steven Gerrard's side had seen the better of the chances in the opening half. Ryan Kent was involved in many of the good attacking moves, including a blocked shot just before the break.
But Rangers were sucker punched early in the second period, playing in front of a raucous home crowd. Soren Reiks slotted home the opener in the 47th minute, before Veljko Birmancevic (49) - who had set him up - saw a shot home via the bottom of the post to ultimately seal the victory for the hosts.
- Steven Gerrard calls for Ibrox crowd help in second leg
- Rangers could face Olympiakos or Ludogorets in CL playoff
- How the teams lined up | Match stats
However, there was late drama to be had when, with the last kick of the game, Davis (90+5) fired home from the edge of the box to half the deficit and give Rangers a fighting chance.
It still leaves the Scottish Premiership champions with a huge task on Tuesday, when they welcome Malmo to Ibrox and attempt to set up a Champions League play-off tie with either Ludogorets or Olympiakos.
How Malmo won the first leg
The first half was a rather even affair - so much so that both sides saw their first shots of the game within a minute of each other. Rangers struck first, but Scott Arfield's effort was an easy collection for Johan Dahlin. At the other end, Jo Inge Berget cut in from the right before striking, but forced a good save from Allan McGregor.
Rangers continued to see the better chances though. Kent sped away down the left, but his cross into the box evaded Scott Wright, who had slipped over. Just after, it was another superb break, but Wright's ball in was cut out by Lasse Nielsen.
It was the Malmo defender who again thwarted another Rangers attack just before the break. James Tavernier made a great steal inside his own half before driving down the right flank. He picked out Kent at the top of the area, but despite working himself into good space, his effort was blocked by Nielsen before being booted away from danger.
But Rangers made the worst possible start to the second half as Malmo netted two quickfire goals. Birmancevic worked himself into some good space in the area and found an unmarked Rieks towards the back post. It was then a curling finish past McGregor to see the hosts ahead.
With the Rangers defence in disarray, Malmo added their second two minutes later in a similar fashion. Having just set up the opener, Birmancevic was somehow left unmarked over on the right. He collected a pass before sweeping home into the far corner via the bottom of the post, with Connor Goldson unable to keep it out.
Malmo only grew in confidence after the goals, and Rangers could not muster much until the latter stages. Wright cut in from the left, picking out summer signing Fashion Sakala in the middle, but the striker just lifted his effort wide. In added time, Wright had an appeal for a penalty turned down after contact from Nielsen inside the area.
But Rangers' best moment of the game was to come. It was no surprise to see Kent involved, twisting and turning on the right before picking out Davis at the top of the area. It was then a wonderful striker that flew into the back of the net, giving the visitors a vital lifeline ahead of the second leg.
Gerrard calls for Ibrox help for second leg
Rangers manager Steven Gerrard to RangersTV: "I'm disappointed with the results and the couple of goals we've conceded. But there's been a big moment at the end of that game which is has gone in our favour. It's a big moment and sets things up for next week.
"It's not the position we wanted to be in, but it's better than going in [to the second leg] at 2-0, and we were also on the verge of maybe going even worse as well. Injury time was very big for us, but over the 90 minutes, it hasn't bene enough.
"We'll have to go up a level individually and collectively next week and I'm going to call on the Ibrox crowd. I've never done it before, but we're going to need them for the full 90 minutes in full voice.
"With that behind us and the mentality change behind us, it could be a big moment.
"I'm running out of plaudits for Davo [Steven Davis], he is someone who doesn't give up and keeps going until the end and he's provided a real big moment that's given us an important lifeline going into next week.
"It is what it is. I don't think we deserved to win the game 2-0 or any worse than that. At half-time, we were OK, I thought we were in a good shape. We were looking the most likely [to score], but we lost our way for four or five minutes and conceded two poor goals.
"But we pushed and showed belief, and Davo has provided a very big moment because the mentality has changed in injury time."
Man of the match - Ryan Kent
It was another good performance from Kent, who was the key driving force behind Rangers' attacking play. It was his quick feet that help create the goal, and he will be vital in the second leg.
Credit too must also go to Wright, who also did well when trusted by Gerrard in such a big game.
What's next?
Rangers travel to Dundee United on Saturday in the Scottish Premiership, live on Sky Sports; kick-off 12.30pm. They will then welcome Malmo to Ibrox on Tuesday evening; kick-off 8pm.