TOKYO — Damian Warner was close to his breaking point.

The decathlete's training inside a frigid arena wasn't going well.

Warner was exasperated, demoralized and unsure if any of what he was doing in preparation for a pandemic-delayed Olympics that might not even happen would pay off.

"I'd come back from the track and I'd be frustrated or confused," said the 31-year-old. "There were some tough times where I was close to tears talking to my coach thinking, 'It's like your dreams are walking away from you, or slowly drifting away, and you couldn't do anything about it.'"

Then his partner — former national team athlete Jen Cotten — gave birth to the couple's first child, a son named Theo.

And the moment Warner witnessed his baby enter the world, everything changed.

"After that it was kind of just like, 'Oh, this no longer matters. Track no longer matters, and I'll just go off and be a dad,'" he said. "When I would go to the track, it'd be like, 'OK let's get this workout done as quickly as possible and then back home.' He came at the perfect time.

"I honestly don't believe that I would have performed as well as I did or even won the gold medal if he didn't come at the time that he did."

Warner's journey, which it turns out crucially included Theo's arrival, to that podium-topping performance — a first for Canada in the decathlon — resulted in another accolade as he was named the country's flag-bearer for Sunday's closing ceremony of the Tokyo Games.

"I can't imagine that was an easy choice," Warner said before leading Canada's athletes into the Olympic Stadium. "There's Christine Sinclair, there's Penny (Oleksiak), there's Maggie Mac Neil, there's Andre de Grasse.

"It would just be easier to just put names in a hat and pull one out."

It might not have been an easy choice, but the London, Ont., native's selection was wholly justified.

Warner put up a stellar performance after stellar performance across the event's 10 disciplines, finishing with a score of 9,018 points.

"It's an honour in my lifetime to be able to represent these athletes at the closing ceremony," said Warner, just the fourth decathlete in history to surpass the 9000-point mark. "I remember when I was growing up, sitting on the couch and watching athletes like Donovan Bailey and Catriona Le May Doan with my mom … and seeing how much effect that they had on my life and inspired me.

"I have no doubt that these same athletes that competed here at this Games will have that same effect."

Warner shattered the Olympic record of 8,893 points in Japan, as well as the Canadian record of 8,895 points he previously set in May in Götzis, Austria.

He's also the first Canadian decathlete to win multiple Olympic medals after also securing bronze at the 2016 Games in Rio de Janeiro.

But it wasn't an easy road.

With his usual gym shuttered due to COVID-19 restrictions, Warner didn't think his training in a run-down rink would be nearly good enough at a Games postponed one year by the coronavirus.

"Especially on social media, I could see some of my competitors in these beautiful places training and competing," said Warner, who set a goal of climbing atop the Olympic podium back in 2010. "I just remember having some conversations with my coaches and saying, 'I don't think this is conducive to high performance or winning a gold medal. Like, I just don't believe in it.' Luckily I had no other options and I just leaned on them and trusted them.

"Turns out that they're right again, and I was wrong."

Chef de mission Marnie McBean, a three-time gold medallist in rowing, said Warner's story clinched his selection to carry the flag Sunday.

"I think what resonated for me was … Damian's training at home and the environment in Canada and his community," she said. "Everyone had challenges, no matter where you were in the world, every plan was different.

"But I think that's what did it for me."

Canada will depart Tokyo with 24 medals — a record for non-boycotted Games — including seven gold, which is the most since the 1992 Olympics in Barcelona.

Warner said the track team was inspired by watching some of the nation's early results as they made final preparations at a camp in the Japanese city of Gifu.

"Once the competition starts and you see other people compete, you can't help but feel inspired," he said. "It's like, 'Oh, I gotta do something, too.' You feed off each other.

"We cheer each other on, follow each other's journeys … it's a cool camaraderie."

The only other Canadian to win an Olympic medal in the decathlon is Dave Steen, who captured bronze at Seoul 1988.

Warner is the second decathlete to carry the flag for Canada after Mike Smith got the nod for 1992's opening ceremony.

Women's basketball player Miranda Ayim and Nathan Hirayama of the Canadian men's rugby sevens team shared flag-bearer duties at the opening ceremony on July 19.

The Tokyo Games were delayed by one year by the pandemic, with events held almost entirely without spectators.

Warner, who plans to compete at the 2024 Olympics in Paris, said every athlete in Japan faced challenges.

And each member of the Canadian team has a tale of perseverance to tell.

"With the flag, it shouldn't be just based off the results," Warner said. "There's some great stories of triumph and people overcoming obstacles. Maybe they didn't finish on the podium (and) they could possibly have been better choices.

"It's a humbling experience."

Warner's mom used to tell him he could do anything he set his mind to.

"Over the years we changed that to, 'You can do anything you set your mind to as long as you have the right people behind you,'" he added.

It's the same message Warner will someday deliver to Theo, who doesn't yet know he played a massive role in helping his father reach decathlon's pinnacle.

"I found the right people behind me," he said.

"I hope Theo dreams big and wants to achieve some great things."

Just like dad.