RIO DE JANEIRO -- In the span of a few hours, Canadian race walker Evan Dunfee experienced the heart-breaking disappointment of finishing fourth, the euphoria of winning a bronze medal and the gut-wrenching reality of having that medal taken away.

The Olympic Games can be cruel sometimes.

Dunfee's gritty performance in the men's 50 kilometres at the Rio Games on Friday was among Canada's best in race walking no matter how you slice it. But that won't make the ordeal any easier for the 25-year-old from Richmond, B.C.

Dunfee originally finished fourth behind Japan's Hirooki Arai. But Athletics Canada protested the result because Arai bumped Dunfee with less than two kilometres to go, causing the Canadian to break stride.

Officials sided with the Canadians, disqualifying Arai and promoting Dunfee from fourth to third.

"Immediately after the race, upon urging from our on-site staff, the technical delegate reviewed video, judged there was an infraction and awarded Evan Dunfee bronze and disqualified the Japanese athlete," Athletics Canada said in a statement.

But Arai filed a protest to the jury of appeals and officials overturned the disqualification, restoring the Japanese racer to the bronze medal position and relegating Dunfee back to fourth several hours after the race ended.

There is no option to appeal the jury's decision, Athletics Canada said.

No Canadian had ever won a medal in the 50K, one of the most gruelling events on the Olympic program.

Dunfee, who was leading the field at the 45-kilometre mark, finished in three hours 41 minutes 38 seconds, breaking his own Canadian record of 3:43:45.

Slovakia's Matej Toth won gold in 3:40:58, while Australia's Jared Tallent was second in 3:41:16.

After crossing the finish line, Dunfee collapsed to the ground, spent after pushing himself to the limit for nearly four hours in the warm conditions.

It would have been the sixth medal for Canada's diverse and talented track and field team, which won just one medal four years ago in London.

Dunfee's performance -- medal or no medal -- is just the latest in a promising series of results for Canada's race walkers.

Until recently, Canada had never had a decent shot at a race walk medal in a sport that was thoroughly dominated by a doping Russian team. Russian walkers won 11 medals over the past five Olympics, but the team has been littered with doping cases.

The Russian track and field team has been banned from the Rio Olympics after evidence of a state-sponsored doping program.

The Russian walkers didn't compete at last summer's world championships either, where Ben Thorne, a 23-year-old from Kitimat, B.C., strode and hip-swivelled his way to bronze.

Then in May, Thorne, Dunfee and teammate Inaki Gomez raced to a historic silver medal at the IAAF World Race Walking Team Championships.

They are all coached by Gerry Dragomir, a former world masters champion.

Dunfee was the first of the Olympic trio to train with Dragomir, then came Gomez, who was a competitive swimmer growing up in Mexico before an injury derailed his career in the pool. Then came Thorne, whose world championship bronze in Beijing got the ball rolling on what would be a historic eight-medal performance by Canada.

The foursome works like a family. They spent the winter training together in Australia. For the final few weeks before flying to Rio, they rented an apartment in St. Moritz, Switzerland, where they took turns cooking dinner. Dragomir rode along on training sessions on his well-travelled bike.

Canada's recent success has brought greater respect from the general public, plus a boost in funding from Athletics Canada and Own the Podium.

"When we're training around the seawall and stuff in Vancouver, we used to get laughed at quite a bit, there's a lot less of that now," Dunfee said in a pre-Olympics interview. "For me personally, I train out in Richmond, it's a completely different story. I run into people on a daily basis who, four or five people every workout, are saying: 'Good luck in Rio."'

At last summer's Pan American Games, where Dunfee and Gomez raced to a 1-2 finish, gold medal high jumper Derek Drouin, plus several other teammates, were there cheering them on.

"Stuff like that, that would have never happened," Dunfee said. "So yeah, I think even the respect from amongst our fellow athletes is greater than it's been before. I think that stems from them seeing that our event looks a little bit different, but we're putting in the same amount of effort that they are and they have respect for that."

Thorne, Dunfee and Gomez also raced in the 20-kilometre event but didn't make the podium.

Like in London four years ago, Tallent won't get to experience the glory of standing atop the Olympic medal podium. Last time, he was deprived of that pleasure by Russian doper Sergei Kirdyapkin, subsequently disqualified. This time, Tallent said he has no qualms.

"We're going to have a clean podium again," Tallent said. "Very different to London; there's no suspicions this time around."