Shalane Flanagan, four-time Olympian, left, watches as Chandler Self is helped by relay runner Ariana Luterman at the finish line during the BMW Dallas Marathon in downtown Dallas. (Nathan Hunsinger/The Dallas Morning News)

It took everything Chandler Self had — and then some — to win the Dallas Marathon on Sunday.

Self began collapsing over the final half-mile an it took a warm gesture of sportsmanship from a fellow runner for her to cross the finish line. Video shows Ariana Luterman, a high school runner at GreenHill Academy, help Self to her feet several times over the final 200 yards. As the two approached the finish line, Self fell again and lunged to fall across it. Marathon personnel immediately came to help her and take her away in a wheelchair.

Luterman, according to one report, was running a relay when she saw Self in distress and decided to step up to help.

“The only thing I could think of to do was to pick her up, so I picked her up and I think she was a little confused at first,” Luterman said. “No way was I going to start sprinting and just leave her there. … You saw, those last 20 meters, she was just down and I was so worried she wasn’t going to make it. So I picked her up with all my might. Right when we got to the finish line, I just kind of pushed her in front of me so she would be the one to cross that line.”

Self, who is from Texas but now lives in New York, was the first women’s finisher in an unofficial time of 2:53:58, ahead of Caitlin Keen, a former SMU runner and volunteer assistant cross-country coach at TCU, in 2:56.38.

Read more from The Post:

The two hurdles Aaron Rodgers is facing this week

NFL Week 14: Playoff picture clears a bit, Vikings and Panthers clash

‘Shalieve’: Ryan Shazier’s Steelers teammates will pay tribute to the injured player

Tom Brady makes nice with Josh McDaniels, says, ‘he knows how much I love him’