MONTREAL – The Montreal Impact were seconds away from failing in their shot at history.

Then they made it in the most dramatic fashion possible.

Facing Pachuca, Montreal became the first Canadian team to win a two-legged series against a Mexican opponent in the Scotiabank Champions League on Tuesday, as rookie Cameron Porter scored in the last minute of second-half stoppage time to secure a 1-1 draw and send the Impact through on the away goals tiebreaker.

The Impact, whose two goals in the first leg of the quarterfinal in Pachuca proved essential as the series ended 3-3 on aggregate, also became the second MLS team in history to achieve this feat in Champions League play. Seattle had broken that particular ground in 2012-13 when they defeated Tigres 3-2 on aggregate, while Kansas City can also make a claim to fame after defeating Santos Laguna back in 2002 in the old Champions Cup.

D.C. United or Alajuelense will be Montreal’s next opponents in CCL, in two weeks’ time. The Costa Rican side currently leads that series 5-2 on aggregate, with the second leg set to be played in Washington on Wednesday evening (8 pm ET, Fox Sports 2).

The decisive play came with under a minute left in stoppage time as Porter, an 85th minute substitute, controlled a Hail Mary pass from Mallace down the left and poked the ball past Oscar Perez, sending the 38,104 fans packed into the Olympic Stadium into raptures.

This, after Pachuca's German Cano had seemingly dashed Montreal's hopes on an 80th-minute penalty kick.

Cano drew the foul himself as he challenged Montreal center back Laurent Ciman on goalkeeper Evan Bush’s left. Ciman’s grab of Cano was enough to send the forward down, and referee Henry Bejarano pointed to the spot. Cano’s powerful drive to the bottom left corner beat Bush, who dove the right way.

The game followed the same pattern as the first leg, but for a different outcome. Though Montreal were more enterprising in the first 15 minutes, they otherwise sat back while Pachuca hogged the ball. The first half left much to be desired, with Pachuca getting the best chances from the run of play.

With Donny Toia and Dilly Duka a solid duo guarding the Impact's left flank, Pachuca attacked right back Victor Cabrera over and over. Left winger Hirving Lozano was involved in Pachuca’s best chances throughout.

The best of those first-half chances came 15 minutes in. Released by Erick Gutierrez, Lozano approached the onrushing Bush, but his low shot trickled wide at the far post.

Neutrals surely enjoyed the second half more. Two good free kick attempts, one by each team, set the tone in the first 10 minutes. The game opened up, and Montreal started grabbing chances. Ignacio Piatti forced a fine save from Oscar Perez in the 63rd minute, and the rebound left Pachuca scrambling to clear for a corner kick.

Cano would get the better of Bush on the penalty, but the Montreal ‘keeper made the save of the game on Cano in the 71st. A low Lozano cross from the left found Cano, but Bush somehow managed to move back into position to push the ball wide for a corner kick with the goal gaping, a save that would prove decisive given the final result of the match.

While they await news on their semifinal opponents, Montreal's focus now shifts to MLS. They start their league season this Saturday, March 7, away at D.C. United.