A New Brunswick man has crossed the finish line of the gruelling Marathon des Sables in Morocco.

The annual six-day ultramarathon, the name of which means ‘Marathon of the Sands,’ covers more than 230 kilometres in the sweltering Sahara Desert. Hundreds of runners gather for the race, which is in its 33rd year. This year is the first for Mathieu McCaie of Dieppe, N.B.

“He’s the perfect guy for it,” his wife, Julie Martin, told CTV Atlantic. “He’s very organized, very strong.”

McCaie registered for what is billed as one of the toughest footraces in the world in December 2016. Since then, the mortgage broker and father of two has been planning and training since then for the test of endurance, which is roughly equivalent to six regular marathons.

The ultramarathon -- which requires participants to be completely self-sufficient, carrying all of their food and sleeping gear on their backs -- is run in several stages that range from 7.7 kilometres to an exhausting 86.2 kilometres, which itself is more than double the length of a standard marathon. McCaie finished that leg of the race at 3 a.m. Thursday.

“His feet (were) a mess this morning, but the doctor (has) seen him and right now he feels pretty good about it,” Martin, who’s been following the race from Canada, said. “He said that bugs won’t even come close to him right now.”

Martin says her partner had two simple goals going into the competition: the first was to survive; the second was to finish.

It appears Martin accomplished both, when his supporters uploaded a video on Facebook of him crossing the finish line on Friday.

Out of 936 runners, McCaie finished in the middle of the pack in 475th place. More than two dozen others had abandoned the race part way through it. Thirteen other Canadians also competed.

McCaie’s mother, Lisa McCaie, says her son has always been determined and adventurous. When he first told her about his plan to run across the Sahara, she replied, “Are you crazy?”

“He said, ‘I know I want to do this,’” she recalled. “And he asked me three times and then I said, ‘Oh well, go do it. I know you can do it.’”

McCaie was able to spend Thursday resting and recuperating before the final leg of the race on Friday.

McCaie will be home in Canada on Tuesday. His mother says he’s already been talking about his next adventure.

“His small son, three years old, said he was going to climb Mount Everest with him someday,” she said. “And I said, ‘Oh my God no!”

With a report from CTV Atlantic’s Jonathan MacInnis