VANCOUVER -- Milos Raonic propelled Canada into the second round of the Davis Cup World Group on Sunday.

Raonic beat Spain's Guillermo Garcia-Lopez in straight sets -- 6-3, 6-4, 6-2 -- at UBC's Doug Mitchell Thunderbird Sports Centre. The win gave Canada an insurmountable 3-1 lead in the best-of-five tie with one reverse singles match to play.

This marks the first time that Canada has advanced to the second round of the World Group level, which is open to the top 16 countries. Canada is ranked 12th on the Davis Cup table while Spain, which lost the 2012 final to the Czech Republic, entered the weekend No. 1.

Raonic was rarely tested by Garcia-Lopez, ranked 82nd in the world, who made his first Davis Cup appearance. Garcia-Lopez was inserted into the do-or-die match by Spanish captain Alex Corretja, who made a late lineup change in a bid to right Spain's fortunes.

Canada entered play with a 2-1 lead and needed just one win in its final two singles matches to claim the tie.

Garcia-Lopez replaced Marcel Granollers, who was tagged as Spain's top singles player for this event as the five-time Davis Cup champion was missing its four top players.

Granollers, ranked 34th in the world, was upset by Frank Dancevic of Niagara Falls, Ont., -- ranked a distant 166th -- on Friday night. The Spaniard also played a gruelling doubles match Saturday that lasted almost four hours.

Spain had up to an hour before Sunday's first match to change its lineup.

Garcia-Lopez has a victory over Britain's Andy Murray, ranked third in the world, at an ATP Tour event in Indian Wells, Calif. The Spaniard has also reached the third round of Grand Slam events on four occasions, the Australian Open twice and once each at Wimbledon and the U.S. Open.

But he struggled to return Raonic's powerful serve. Raonic used aces to clinch the first and second sets.

Garcia-Lopez tried to counter Raonic's power with several cross-court shots in a bid to get the world's 15th-ranked player running around the court. But Raonic, from Thornhill, Ont., had little difficulty returning Garcia-Lopez's attempts.

Raonic left Garcia-Lopez vulnerable to several smashes, and caught the Spaniard going the wrong way a number of times with crisp volleys.

Canada's top singles player got off to a hot start as he opened with back-to-back aces and won the game at love with a well-placed volley in the back corner opposite Garcia-Lopez. Raonic took a 3-2 lead in the first set with another ace as he launched a 220-km/h serve past his opponent.

After coming back to break Garcia-Lopez's serve in the sixth game, the players held serve the rest of the way as Raonic took the opening set 6-3.

Raonic maintained his momentum in the second set and started the third set with a service break and hold to go up 2-0. Garcia-Lopez managed to hold serve in the next game, but Raonic proceeded to break again and was well on his way.

Serving for the match, Raonic built up a 40-15 lead and closed out the historic win with an overhead smash, prompting a standing ovation from the flag-waving crowd.

Dancevic played Albert Ramos in the dead rubber later Sunday.

Canada will host Italy in the quarter-finals in April.