MADRID -- Canada won the decisive doubles match to beat Australia 2-1 and reach the semifinals of the Davis Cup Finals on Thursday.
The 30th-ranked Kyrgios won both of his matches in the group stage without dropping a set. He was substituted by the 48th-ranked John Millman, who hadn't played previously in Madrid.
Millman lost Thursday's first singles to Pospisil 7-6 (6), 6-4, but Alex de Minaur evened the series for Australia with a 3-6, 6-3, 7-5 win over Shapovalov in a battle of 20-year-olds at the "Caja Magica" center court.
Shapovalov and De Minaur previously met in the 2015 junior Davis Cup final and in the 2016 Wimbledon boys final.
Canada had not beaten Australia in nine previous Davis Cup meetings, with only one match victory.
Earlier this week, the Canadians ended a losing streak of 15 meetings against the United States, a team it had never beaten in the Davis Cup.
Canada will next face either Serbia or Russia, who play their quarterfinal on Friday morning.
The new Davis Cup Finals is being played in World Cup-style with all 18 teams playing in a single venue in the same week. The tournament overhaul is the result of a 25-year partnership between the International Tennis Federation and Kosmos, a group co-founded by Barcelona soccer player Gerard Pique.