VANCOUVER -- Chalk two up for the underdogs.

Milos Raonic and Frank Dancevic staked Canada to a 2-0 lead over favoured Spain on the first day of a Davis Cup tie on Friday.

After Raonic opened with a hard-fought win over Albert Ramos, Dancevic cruised to a straight-sets victory over Marcel Granollers, putting the home squad on the verge of a major upset -- and Canadian tennis history -- in the best-of-five series.

"(The ball) felt good coming off the racket," said Dancevic, , who is ranked 166th in the world, the lowest of any player competing this weekend.

"It's definitely one of the best matches of my career, I have to say. He's not an easy player to play."

Spain, ranked No. 1 in the world, is a five-time Davis Cup champion and reached the finals last year before being upset by the Czech Republic. Canada, meanwhile, has never advanced beyond the first round of World Group play, which is open to the top 16 countries.

"It is not over, even if we believe that we might need a miracle to win this tie right now," said Spanish captain Alex Corretja.

With a win in doubles play Saturday, Canada can advance further than it ever has in Davis Cup play.

"We know how difficult is the situation, and (Saturday), we go out there and try to win doubles -- for sure," said Corretja. "Right now, it is not easy to feel anything positive, because we just lost two matches and, especially, the second one is quite sad."

A year ago, Dancevic, a 28-year-old Niagara Falls, Ont., native, was an alternate for a Davis Cup tie here with France, and only drew in after Raonic suffered a minor knee injury and could not play his second rubber match. Dancevic drew in this time largely because Vancouver's Vasek Pospisil is recuperating from mononucleosis and will only play doubles.

But Dancevic defeated Granollers, Spain's top singles player for this event, 6-2, 6-2, 6-2 with relative ease. The Canadian's biggest battle came at the end as Granollers staved off two match points and then hit the ball long on the third one.

"I played my game style from the first point til the last point -- I'm very proud of myself for that," said Dancevic. "It's a big step for me."

Corretja said Dancevic played like his eyes were closed as all of his shots seemed to stay in.

"He was absolutely amazing, and it's a shame that we didn't find a way to damage his game," said Corretja. "And it's also a shame that he is not better on the tour, because seeing a guy with such (an) amount of talent on his racket, and being 166th in the world, I'm kind of surprised that he's not better -- because I think he should be better. That would be great for the tour, because his game is beautiful to watch.

"Unfortunately, today, it was painful to watch -- for us."

Raonic struggled early in the opening match but still got Canada off to a good start. The Thornhill, Ont., native overcame a one-set deficit to beat Ramos 6-7, 6-4, 6-4, 6-4 before a crowd of 6,012 at UBC's Thunderbird Sports Centre.

"I don't think I faced a break point, so I took care of my serve," said Raonic. "I was a little bit disappointed a few times. I was 40-love and I would make sloppy mistakes to 40-15 and let him get to 40-30.

"I just need to execute those a little bit better."

Raonic's Spanish opponent allowed that he was outplayed.

"I played well, but in the end he played better than I did," said Ramos.

Raonic, ranked 15th in the world, entered the match as the clear favourite. Ramos, ranked 51st, and listed as Spain's No. 2 singles player for this event, was playing his first-ever Davis Cup match.

But Ramos was not consoled by his strong early showing or the way he battled throughout the contest.

"I'm not happy," he said. "I play to win, so I'm not happy."

Raonic struggled early, hitting the net several times on what appeared to be routine forehand shots. Raonic held a 5-3 lead in the first-set tiebreaker, but missed while attempting to return a long Ramos shot to go down 6-5 and then hit a long shot out to give the Spaniard the opening set.

Raonic said it was frustrating to lose the first set, but he still felt good because he was creating chances for himself to earn points. He adjusted his positioning further left in the second set to ensure that Ramos could not keep his shots along the sideline in.

Canada's top singles player finished with 26 aces on the day, while Ramos recorded 13. However, the Spaniard never managed to break Raonic's serve over the course of 43 games.

"It was difficult to return the Canadian's serve," said Ramos.

Spain is playing without four of its highest-ranked players -- David Ferrer (fourth), Rafael Nadal (fifth), Nicolas Almagro (11th) and Fernando Verdasco (24th) -- this weekend.

While Nadal and Almagro are recovering from injuries, Ferrer and Verdasco chose to rest.

Raonic said the first win was "very important" for Canada's confidence. He triumphed while playing the opening match in Davis Cup play for the first time.

"The only thing I have to get used (to) today that's a little bit different than playing the second match, like I've always done before, is that opening ceremony," he said. "People expect you to be calm, quiet, but I sort of like to get activated before.

"So during that whole opening ceremony, I was like fidgeting back and forth and then during the national anthem, out of respect, you stand still.

"But that (ceremony) the only difficult thing (about preparing for the opening match) because your routine changes a bit going out there."

As it turned out, Raonic did not get the start he wanted, but he got the finish Canada needed, much to the delight of the raucous red-and-white clad, flag-waving crowd.

"I was not giving them too much to work with, but it was amazing how supportive they were and how loud they were," he said.

Canadian captain Martin Laurendeau said Raonic's early victory "set the tone" for the opening-day sweep.

"For sure, that had an impact on (Dancevic)," said Laurendeau. "Watching in the locker-room and seeing his teammate put us 1-0 ahead, it certainly helps to follow up and to, maybe, swing a bit more freely.

"But I guess he swung a lot more freely."