Japan's hopes of breaking their 20-year World Cup winless streak were ruined as a last-minute penalty by Canada's fly-half Ander Monro left the two sides drawn at 23-23.
It was the second successive World Cup that the two teams have registered a draw, Japan needing a last-gasp conversion to tie the scores at 12 points apiece at the 2007 tournament.
Monro, who had taken over kicking duties from injured fullback James Pritchard had had a shocker with the boot here, but showed enough steel to bang over a 79th minute penalty to draw the scores level after also crossing for a try he had failed to convert.
Tries from Shota Horie and Kosuke Endo allied with 13 points from the boot of James Arlidge had put Japan in the driving seat and seemingly ready to make up for previous Pool A losses to France (47-21), Tonga (31-18) and New Zealand (83-7).
But it was not to be as Japan's early tenacious defence, led magnificently by centre Ryan Nicholas, faded towards the end of a match that had an almost festival feel to it.
"Sort of a tough one," said Canada skipper Pat Riordan.
"We started well ... then they got a couple of penalties. But we put up a great fight at the end and got a couple of points.
"The job is done. We close the chapter and get on with the next one (against the All Blacks)
Japan coach John Kirwan commented: "Don't know whether to be happy or sad but the boys played their hearts out. Just a few errors in the seond half cost us."
The match opened at a frantic pace, DTH Van der Merwe chopped down just short of the line by arguably the tap tackle of the tournament so far from Japan fullback Shaun Webb.
Van der Merwe got a try soon after, however, bumping a tackle to go in under the posts for a five-pointer Pritchard converted.
But Japan came roaring back, hooker Horie driven over the tryline after Alisi Tupuailai's offload, Arlidge adding the extras to equal the scores.
Arlidge added a penalty in the 25th minute, but Monro's first effort came back off the post.
Japan then took command of the match, seeking to run everything and when Canada attacked to employ a ferocious offensive defence.
A flustered, leaden-footed Canada were particularly lax at the breakdown and suffered a number of turnovers because of the hard-hitting tackles, Nicholas and lock Luke Thompson to the fore for Japan.
John Kirwan's side bravely spurned a couple of kicks for goal in a bid for a try before the half-time hooter.
And they were rewarded when a well-worked wrap-around move between Arlidge and Nicholas in midfield saw Endo slicing through some feeble defence for a try Arlidge again converted to make it 17-7 at half-time.
Canada enjoyed the best possible start to the second period, Phil Mackenzie riding a terrible tackle by replacement Bryce Robins to sprint in from 35 metres. Monro missed the conversion to leave the score 17-12 to Japan.
When the Japanese defence strayed offside in the 64th minute, Monro kicked his first penalty to cut his team's deficit to two points.
Arlidge restored the five-point lead a minute later and the New Zealand-born fly-half stretched the score to 23-15 with a 73rd minute penalty, meaning Canada had to score twice to regain the lead.
In a nail-biting finish, Monro then crashed over the line as the Japanese scramble defence was found wanting.
He missed the conversion but managed a trickier penalty with just 90 seconds to play to draw the teams level at 23-23, Arlidge's desperate drop-goal drifting short and wide.