Tyler Ennis poured in 42 points as Canada's men's junior team defeated China 110-100 in triple overtime on Saturday to advance at the FIBA under-19 world championship.

The victory sets up a date with Spain for fifth place in the tournament. Canada has a chance to better 1987's sixth-place finish for the top standing by a Canadian squad at the competition.

Ennis, from Brampton, Ont., added eight rebounds and four assists and now tops the competition's list of highest scorers with an average of 22.6 points per game.

Toronto's Xavier Rathan-Mayes finished with 15 points and nine rebounds, while Kaza Keane added seven assists.

The first half went back and forth, with Canada leading after the first quarter 18-15 and going into intermission tied 32-32.

After heading into overtime tied 78-78, Ennis hit a basket with under a minute to go in the extra frame to put Canada ahead 85-83. But China responded as Shuai Yuan equalled the score to send the game to a second extra session.

A basket by Rathan-Mayes followed by an Ennis free throw gave Canada a three-point lead with 14 seconds remaining in the second overtime, but China tied it again when Shang Gao answered with a long three-pointer with just two seconds to spare.

A timely Marko Pirovic three-pointer broke the game open in the final overtime and Canada finished on a 12-2 run on the strength of the backcourt duo of Ennis and Rathan-Mayes.

"In one of the craziest international games that I have been a part of, we got a very special performance from Tyler Ennis," said Canadian head coach Roy Rana. "Our guys showed incredible mental toughness being down two players and beating a very good Chinese team to secure a fifth- or sixth-place finish.

"We're not stopping yet. We're getting ready for tomorrow and hopefully we can come out with another win."

"Coach gave me the green light near the end of the game," added Ennis. "He said to go out there and score. He gave me a lot of pick-and-rolls with our big men. I just wanted go out there and make good plays — to not only score, but also involve my teammates."