Toulouse turned the tables on Ulster and dramatically booked their place in the Heineken Champions Cup quarter-finals by beating the 14-man Irish province 30-23 at the Kingspan Stadium to seal a 50-49 aggregate win.

Tries from Thomas Ramos, Romain Ntamack and skipper Antoine Dupont, along with three conversions and three penalties from Ramos, tipped the scales Toulouse's way.

However, the key moment in the contest came in the 64th minute when replacement prop Tom O'Toole was red-carded for a dangerous hit on Anthony Jelonch.

Ulster had led several times after bringing a 26-20 lead back from the first leg in France. Ethan McIlroy scored two tries for them, with John Cooney kicking both conversions and three penalties in a game they led 20-17 at half-time.

First blood was drawn by the visitors, with a second-minute penalty being kicked by Ramos after Jelonch won a breakdown. From the kick-off, Robert Baloucoune was yellow-carded for hitting Jelonch in the air.

Three minutes later Dimitri Delibes was sent to the bin by referee Matthew Carley for lifting and dumping Ethan McIlroy, and shortly afterwards Ramos took a quick lineout throw near his corner flag and threw the ball to Dupont who tried to run out.

Dupont was nailed by Michael Lowry and Ulster gobbled up the loose ball, with James Hume providing the assist for McIlroy to score. Cooney converted and Ulster were up 7-3.

Ramos cut Ulster's lead to just one point after 13 minutes but when Toulouse strayed offside, Cooney did the needful to put Ulster four in front.

However, after 21 minutes, Ntamack combined with Dupont to cut Ulster open and put Ramos in under the posts, the full-back also converting. Toulouse now led 13-10 and had cut Ulster's aggregate lead to just three points.

Five minutes later, Ntamack ran in from distance after intercepting a Cooney pass, Ramos again converting to put the visitors 20-10 in front.

The half ended with Ulster striking back when, with a penalty advantage, Billy Burns cross-kicked and McIlroy did really well to gather and score. Cooney added a terrific conversion to cut Toulouse's lead to three points on the night, with Ulster now 43-40 ahead on aggregate.

Twelve minutes into the second half, Cooney landed his second penalty to tie the scores but nudge Ulster back into a six-point aggregate lead.

Lowry then escaped any card after clattering Ramos in the air prior to the Toulouse full-back landing a 63rd-minute penalty to nudge the French visitors in front on the scoreboard and cut the overall margin over the two legs to just three.

Another blow to Ulster rapidly followed when replacement O'Toole was sent off for hitting Jelonch four minutes after the hour, but the home side still managed to get the next scoring opportunity from a lineout penalty. Cooney slotted the three points to tie the scores on the night.

But with five minutes remaining, Toulouse ran a touchfinder back with Ntamack going left and Dupont sliced through at the posts, with Ramos again converting to put the visitors back in front at 30-23 and one point in front over the two legs

Ulster: Mike Lowry; Rob Baloucoune, James Hume, Stuart McCloskey, Ethan McIlroy; Billy Burns, John Cooney; Andrew Warwick, Rob Herring, Marty Moore; Alan O'Connor, Iain Henderson (capt), Marcus Rea, Nick Timoney, Duane Vermeulen.

Replacements: Brad Roberts, Eric O'Sullivan, Tom O'Toole, Kieran Treadwell, Jordi Murphy, Nathan Doak, Luke Marshall, Rob Lyttle.

Toulouse: Thomas Ramos; Dimitri Delibes, Tim Nanai-Williams, Pita Ahki, Matthis Lebel; Romain Ntamack, Antoine Dupont (capt); Rodrigue Neti, Peato Mauvaka, Charlie Faumuina; Rory Arnold, Richie Arnold; Rynhardt Elstadt, Anthony Jelonch, Selevasio Tolofua.

Replacements: Guillaume Cramont, David Ainu'u, Dorian Aldegheri, Emmanuel Meafou, Thibaud Flament, Antoine Miquel, Baptiste Germain, Lucas Tauzin.

Referee: Matthew Carley (RFU)