They were the 45-year-old legend on his last legs coming off a second-rate season and a singles player scratched from Friday’s opener as he battles back from a back injury, who retired from his first match at the U.S. Open in New York and hadn’t played since.

It was doubles day at the Davis Cup tie and Canada was considered to be in double trouble.

India went in as the higher-ranked pair with Rohan Bopanna ranked No. 19 in the world in doubles and Purav Raja at No. 36.

Canada’s Daniel Nestor, one of the greatest doubles players in history and a former World No. 1, went in ranked No. 43, while Vasek Pospisil, inactive in the two-man game most of the year, fell to No. 111.

But a funny thing happened on the way to Sunday’s singles reversal day to give 18-year-old sensation of the nation Denis Shapovalov a chance to put the Indians away (1 p.m.) in the fourth match of the best-of-five event to send Canada to the World Group – the sweet 16 – for a seventh consecutive year.

Canada won 7-5, 7-5, 5-7 and 6-3.

For his part, 27-year-old Pospisil said he never considered he and his elderly partner underdogs for a moment.

“Danny and I were playing at home. And I was able to conjure up in my mind playing in the doubles Saturday when I was replaced from the singles Friday,” he said of the decision to lead off with rookie Brayden Schnur in the opener and save him for the doubles and the rubber match of the best-of-five singles should Shapovalov lose today.

“I think it played a big part in the win today for two reasons,” Pospisil said. “One, I wasn’t ready to play singles on Friday. I was pretty beat up.

“The other part of it is I could prepare more on doubles stuff knowing it was going to be my first match.

“A lot of times it’s been singles, doubles, singles,” he said of being Canada’s main man playing all three days. “I think (Saturday) was one of my better doubles days in all of my Davis Cup appearances.

“Not having that match on Friday changed a lot of things. It was a good move in terms of the match today,” said the 14-time Davis Cup veteran.

Pospisil said he thinks he’s good to go in a fifth rubber if needed.

“I’m just going to see how I react Sunday morning to be honest with you. I want to play, obviously. This is the first time I was able to even spend more than a few hours on the court.

“This was what was supposed to happen, though. I was supposed to start feeling better this week. Not for Friday, which is why I didn’t play.

“The timing is working out perfect where I will be ready to go Sunday based on my performance in doubles. Physically, I will be ready to go for sure. But it won’t be my decision.”

Captain Martin Laurendeau said it’ll be a game-day decision.

“Our plan throughout this whole has been to go through one tie at a time, especially with Vasek in his situation. It’s the same now,” he said.

“We’ll see how he feels. But right now, the focus is on Denis because he’s first up. We’ll see how Vasek is (Sunday) and talk with our medical people, and hopefully, do the right thing. But right now, there’s no call to make. Right now the focus is on Denis.”

Nestor said he thought it was a toss-up when it came to who should be favored in doubles.

“I thought it was 50-50,” said Nestor, the most successful player in all of Canadian Davis Cup history with now 48 wins including his singles appearances. “They’re a solid team. They’ve had a lot of success on the tour, especially lately. It was a close match and we were very fortunate to get ahead early and stay ahead.

“I thought I played pretty solid today. I didn’t feel like I helped the team the last couple of years as much as before that. Hopefully, I can play some more matches,” he said of the idea of putting Canada in position to win this thing and move on to World Group play in February.

Nestor, playing in his 51st Davis Cup tie, played his 54th doubles game and increased his career record to 33-11 while Pospisil, in his 13th Davis Cup in doubles, in now 8-5.

From an India perspective Bopanna marveled at Nestor, a former doubles partner of his on the tour.

“I think he always plays very well in the Davis Cup, especially with the home support,” he said.

Captain Mahesh Bhupathi felt it was India’s moment to seize.

“Obviously we’re very disappointed with the result. I think we were in many positions to probably take control of that match and we didn’t do that. It’s definitely a disappointing result.”