VANCOUVER -- Canada is moving on to the second round of Davis Cup World Group play for the first time after an upset victory over top-ranked Spain.

Milos Raonic of Thornhill, Ont., defeated Guillermo Garcia-Lopez 6-3, 6-4, 6-2 in the opening reverse singles match to lock up the win for Canada.

The victory gave Canada the crucial third win in the best-of-five tie at UBC's Doug Mitchell Thunderbird Sports Centre.

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

Raonic and Frank Dancevic of Niagara Falls, Ont., won their opening singles matches Friday to give Canada a 2-0 lead.

The Spaniards, who were missing their top stars to injury and rest, won the doubles match Saturday.