Halfway through the Pittsburgh Marathon on Sunday, two strangers -- both needing a boost -- vowed to make sure the other crossed the finish line.

They were dead last. But they did it -- crossing the finish line hand-in-hand, at 7 hours and 11 minutes, a moment of sheer triumph and support that was captured in a photo that has gone viral.

Laura Mazur and Jessica Robertson spoke at about Mile 14, feeling daunted by the long road ahead to the finish, and feeling an instant bond. They shared their desire to each other to finish the race, and promised to see the other through the finish line, the local CBS affiliate reported.

The women told their story to Betsy Magovern and Daniel Heckert, who both had finished the half-marathon and were staying to watch the full marathon. Heckert took the photo of the heartwarming moment.

BELFAST MARATHON ORGANIZERS ISSUE APOLOGY AFTER COURSE REVEALED TO BE 0.3 MILES TOO LONG

“I just ran over to grab my phone as they were coming,” Heckert told CBS Pittsburgh on Tuesday. “They started holding hands right before they got to the Mile 25 cheer station. I just wanted to capture the moment that showed these two ladies were going to finish the same race that winner did.”

Robertson, who is seen on the right, was running in her first marathon while Mazur was competing in her 12th.

“I thought to myself, I’m not going to make it. There’s literally no one else out here but me and I can’t do this by myself, I just can’t,” Robertson said.

Mazur was the one who made a promise to Robertson.

“She said, ‘I’ll make you a promise. I won’t leave you if you don’t leave me. And no matter what, we will cross [the finish line] together.’ And I said, ‘Well, I won’t leave you because I can’t do this alone,’” Robertson told CBS.

Magovern said she was “impressed” the two runners were still in good spirits by the last mile.

“They were in good spirits and good cheer. There’s a lot of raw emotion at mile 25, that’s why it’s helpful to have a cheer station there,” Magovern told CBS.

CLICK HERE TO GET THE FOX NEWS APP

The photo, which was shared on Facebook, received more than 6,000 reactions and 3,000 shares.

“They could have given up," Heckert said. "They could’ve said, the sweep vehicle’s right behind us, we hurt too much, we’ve got too far to go. There’s nobody around them. They did this by themselves. Where everybody else has a crowd to go through, they spent the majority of this, the two of them together."