MONTREAL -- Felix Auger-Aliassime was changing wristbands in preparation for the third and final set of his showdown with Milos Raonic.

Seconds later, the teenager's countryman appeared -- arm extended -- to shake hands.

And just like that, Auger-Aliassime was moving on at his hometown tournament.

The rising tennis phenom advanced to the third round of the Rogers Cup on Wednesday night after Raonic was forced to retire from their all-Canadian matchup with a back injury.

"I was pretty shook ... didn't really know how to react," Auger-Alissaime said. "A few seconds later it sunk in."

After losing the first set 6-3, Raonic received treatment from a trainer midway through the second on centre court.

The 28-year-old from Thornhill, Ont., battled to take that set by the same score but, after speaking with a doctor, the 19th-ranked player in the world called time in front of a disappointed crowd at IGA Stadium.

"(The) last 30 minutes of that match, just because of the situation we're playing in, being primetime night match here in Montreal, was probably the least enjoyable 30 minutes I've spent on a tennis court," said a dejected Raonic.

He added the pain, which flared up Tuesday night, started in his glute and crept down his leg.

"I just keep trying to pinpoint, figure out what the right step is," said Raonic, who has been plagued various injuries this season and throughout his career. "I keep getting assured there's nothing extensively serious about the back."

Ranked No. 21 overall and set to turn 19 on Thursday, Auger-Aliassime picked up his 30th win of the campaign and improved to 14-4 over his last five tournaments.

He was happy to move on, but it wasn't the way he envisioned.

"To see Milos go out like that was not easy," Auger-Aliassime said.

In the only other match involving a Canadian, Denis Shapovalov of Richmond Hill, Ont., fell to No. 2 seed Dominic Thiem of Austria 6-4, 3-6, 6-3.

Raonic, who withdrew from a semifinal against Auger-Aliassime in Stuttgart back in June and has yet to finish a tournament healthy in 2019, said the medical staff on site was unable to guarantee he wouldn't aggravate whatever's wrong if he kept playing.

"The thing that was most concerning (was) it was getting progressively worse," said Raonic, who had played just 10 events in 2019 prior to Montreal thanks to back and knee problems. "Even if I find a way to get through, which would be extremely tough, who knows if I'm even ready to play (Thursday)?"

That task instead falls to Auger-Aliassime, who will take on No. 6 Karen Khachanov after the Russian defeated Switzerland's Stan Wawrinka 6-4, 6-7 (3), 6-2.

"Pretty big guy, big serve, pretty explosive," Auger-Aliassime said of his next opponent. "If I give him time to get behind the ball and dictate the points, it's going to be tough."

The 20-year-old Shapovalov grabbed the hearts of tennis fans here in 2017 when he upset world No. 2 Rafael Nadal -- ranked 141 spots ahead of him at the time -- on the way to making the semifinals.

There will, however, be no such run this time around.

Shapovalov fell behind when he double faulted to hand Thiem, the tournament's second seed, a 5-4 lead in the first set. The 31st-ranked player in the world rebounded in the second, breaking Thiem to go up 5-2 and holding serve from there.

But then in the third set, Shapovalov doubled faulted and sent an overhand smash into the net to fall behind 5-3.

Despite the partisan crowd doing its best to urge Shapovalov on, Thiem finished the Canadian off with an ace.

"It's a tough one," Shapovalov said. "I showed myself that my level's there, that I'm able to compete against a player like this and have chances to beat him."

The Canadian snapped a five-match losing streak -- and a 2-9 run dating back to March -- with a victory over France's Pierre-Hugues Herbert in the first round of the US$5.7-million ATP Tour Masters 1000 series event on Monday.

The 25-year-old Thiem -- ranked No. 4 in the world behind Novak Djokovic, Nadal and Roger Federer -- was coming off a victory on clay at the Generali Open in his native Austria.

Shapovalov, who took a break from tennis before the Rogers Cup, lost in the round of 16 at last year's tournament in Toronto -- site of the women's bracket in 2019.

Despite the disappointing end, he said his two matches in Montreal will serve as a confidence boost.

"It was great to be back out there just fighting," Shapovalov said. "If a couple of shots had went my way, I could have definitely won the match. It's obviously a little tough to swallow."

Nadal, the top seed and defending Rogers Cup champion, downed Great Britain's Daniel Evans 7-6 (6), 6-4 to advance in an afternoon match delayed by rain three times.

"All the matches are difficult here," said Nadal, a four-time Rogers Cup champion and the world No. 2. "It was a tough first set."

In other action, Poland's Hubert Hurkacz stunned No. 4 seed Stefanos Tsitsipas of Greece 6-4, 3-6, 6-3, France's Richard Gasquet upset fifth seed Kei Nishikori of Japan 6-7 (6), 6-2, 7-6 (4), and Chile's Cristian Garin downed No. 12 John Isner of the United States 6-3, 6-4.

Seeds advancing included No. 6 Daniil Medvedev of Russia, No. 7 Fabio Fogini of Italy, No. 10 Roberto Bautista Agut of Spain, No. 14 seed Marin Cilic of Croatia, and No. 16 Gael Monfils of France.