Borussia Dortmund struck twice in stoppage time to beat Malaga 3-2 and reach the Champions League semi-finals in dramatic fashion.

Malaga appeared to be heading into last four in their debut season in the Champions League but their dreams were dashed when stoppage time goals from Marco Reus and Felipe Santana sent the Germans through in a stunning encounter.

The Spaniards, who drew 0-0 in the first leg, stunned the 66,000 crowd in Dortmund when Joaquin shook off his markers and drilled in a low shot for the lead in the 25th minute.

Dortmund striker Robert Lewandowski drew the hosts level in the 40th minute and they squandered a string of chances in the second half with Marco Reus and Mario Goetze.

Eliseu appeared to seal Dortmund's fate when he put the Spaniards ahead in the 82nd minute, but Reus and Santana scored late in the game to spark wild celebrations among the home fans.

Santana's winner left the Malaga players fuming as when the cross came in, four players appeared offside and when the Brazilian defender poked the ball over the line in the dying seconds, he too looked offside.

Dortmund's players and fans will probably not lose too much sleep over the shortcomings of the officials, with the frenzied delight of the home contingent starkly contrasted by Malaga's crestfallen players, who as the final whistle blew clearly were struggling to comprehend how they had been turned over.

A nervy opening was perhaps understandable with so much riding on the result, and it took until the 16th minute for the first effort on goal to arrive as Lewandowski sent a chipped effort sailing over the bar.

After failing to produce a shot on target in the first quarter of the match, Malaga went ahead courtesy of their first meaningful attack.

Julio Baptista started the move with a pass into Joaquin, who exchanged passes with Isco before selling his marker a dummy and sending a low finish into the left corner.

Reus saw a shot charged down in the 37th minute as Dortmund searched for a way back, but the home fans did not have much longer to wait for the breakthrough as the hosts conjured a goal of real class five minutes before the break.

Mario Gotze's incisive forward pass was backheeled beyond the Malaga backline by Reus into the path of Lewandowski, who expertly dinked the ball over the sprawling Willy Caballero before tucking the ball home under pressure from Jesus Gamez.

The second half began with a bang with both sides going close to adding to the scoring inside three minutes.

First Lewandowski was afforded time to take aim from the edge of the area but Caballero got down to save, while two minutes later Roman Weidenfeller produced a fine reflex stop to deflect away Joaquin's downward header.

The hosts were given a let-off when Marcel Schmelzer appeared to raise his hands to the face of Gamez amid a tussle by the touchline, but rather inexplicably it was the Malaga man who went into the referee's book.

The home fans were on their feet in the 75th minute ready to acclaim a goal as the unmarked Reus looked to turn home a low centre from six yards but Caballero's trailing leg was in the right place as the Malaga number one made a wonderful save.

Caballero was again the hero for the visitors in the 79th minute as Gotze was played clean through but the goalkeeper flicked out a leg to deflect the ball inches wide of the post.

Caballero's heroics looked set to be the cornerstone of a famous win when three minute later Malaga went 2-1 up as Baptista's goalbound shot was turned home by Eliseu from almost on the goalline, despite the substitute having strayed offside.

The match appeared to be destined to end in Malaga's favour as added time arrived, but all that changed when Dortmund were awarded a free-kick 40 yards from goal.

Caballero was helpless to deny Dortmund yet again as woeful defending from the set-piece saw the ball break to Reus to fire in from close range.

The hosts still needed a goal to progress to the last four, and incredibly it arrived in the third minute of added time.

The officials failed to spot three Dortmund players in offside positions when the ball was launched into the area, but when the ball broke to Santana - also in an offside position on the goal-line - he had no hesitation in blasting home to trigger scenes of disbelieving delight in the Westfalenstadion.