Canadians Meagan Duhamel and Eric Radford skate during the PyeongChang Olympic Games. (Robert Cianflone/Getty Images)

As Olympic preparations began for skating pair Meagan Duhamel and Eric Radford, it became very clear this was the end.

They were seven-time Canadian national champions and two-time world champions in pairs figure skating. They’d be among the field’s most seasoned veterans in the PyeongChang Games, still medal contenders.

They sat down as spring turned to summer in Ontario and took stock of what was left in their competitive careers. Radford had just recuperated from an injury that set the pair back to seventh place at the world championships. They fired Duhamel’s coach of more than a decade.

And then choreographer Julie Marcotte brought a piece of music for the team to consider for PyeongChang: a cover of U2’s “With or Without You” by a Provo, Utah singer-songwriter named April Meservy.

“Her voice was raw, powerful and captivating,” Duhamel wrote in a blog post about the choice. “Julie, Eric and I sat there in tears listening to it. There was no plan B after that. This was it. It had to be it.”

Now they’ll perform to the piece in PyeongChang — the first time music with lyrics is permitted for Olympic figure skating — in the pairs short program, with Meservy on hand to see it. (The competition will be broadcast live on NBC at 8 p.m. Eastern Wednesday. Other skating pairs will perform to tracks by Ed Sheeran, Tears for Fears and Leonard Cohen, along with a selection of classical and instrumental pieces.)

“I’ve been doing the singer-songwriter thing for a long time now,” Meservy said in a phone interview this week. “I know the reality of that happening for somebody, and the chances of that happening are so remote.”

So was recording the track in the first place.

Meservy had just ended a longtime on-again-off-again relationship several years ago when she showed up at a friend’s in-home studio, ready to produce an album for another artist. Before the group got started, Meservy broke down.

“I feel like I cannot live with or without him,” she told the audio engineer. He tapped out the chords to U2’s 1987 hit “With or Without You,” low and slow, and nodded for Meservy to start singing. The pair added a deep cello and a backing vocal. That was it.

“Every single line of that song felt so true about the feelings I had during that experience,” Meservy said. “For me, I just thought it was helping me process what was going on.”

She held onto the track and never planned to share it. Her relationship stopped and started and stopped yet again. When it finally ended for good, about a year ago, she released the track as a single.

Marcotte, the choreographer, found the track months later, and before long, the skaters were posting clips online with previews of their routine. (A friend of Meservy’s follows the skaters on Facebook and recognized the track on one of their training videos.)

Duhamel wrote on her blog that the song “gave us hope for the future, hope that we, as a team, would be back and hope that we really could evolve and grow our skating to a level it has never been.”

“It was late at night and I’m in tears as I read [the blog post],” Meservy said. She made plans to travel to Vancouver for the 2018 national championship in January, and mulled booking a trip to PyeongChang, as well.

Before she could purchase airfare, an anonymous donation arrived with enough money to send her to the Games.

“I don’t think I’ve ever cried so much for joy in my life,” she said. “It’s an incredible, beautiful miracle, the whole thing.”

Read more Post coverage from PyeongChang:

Chloe Kim’s coronation is complete as rising U.S. star wins halfpipe gold

South Korean figure skater’s sunglasses helped him go viral

All the latest from Day 4 of the competition

The Post’s Olympic TV schedule and the action you just can’t miss

A South Korean figure skater’s sunglasses helped him go viral