Dion Leonard and Gobi the dog run through the hills of Edinburgh.

Six months and nine days after meeting her, Dion Leonard got the birthday present he wished for when his best friend walked through the door of his Edinburgh home.

Their meeting in the barren, punishing deserts of China is so storybook that one is actually being written. Their separation was cruel and forced a heartbroken Leonard to take a sabbatical from his job and fly back to China where he prayed for a reunion. After 10 days of desperately searching for her in the streets of Urumqi, a mega city home to three million people, it was “love again at immediate sight.” Their relationship had been so tumultuous, he was beginning to lose faith they’d ever live together.

“It wasn’t until we got here that I actually believed it was going to happen,” Leonard said from his home in Edinburgh, Scotland. “It was nice to walk through the front door, pause, and realize we achieved what we set out to achieve.”

His best friend, of course, is a dog named Gobi.

The two met when Leonard was running a seven-day, 250 km ultra-marathon in July that stretched through the Chinese Gobi Desert. The stray dog visited Leonard’s campsite after the first day of running. When he was lining up to begin the second day of the event, Leonard noticed Gobi by his side.

“Lo and behold we start getting going and she’s next to me, matching me pace to pace and she’s looking up at me like ‘I’m going to run with you,’” Leonard told the Post in July.

The two would run more than 126 km together, with Leonard sustaining her by splitting the strict rations he was given. He refused to leave her behind — even when she cost him an advantage in the race — carrying her across rivers and through scores of sharp rocks.

At other times, Gobi pushed Leonard ahead, racing 20 metres down the road ahead of him and waiting for him to catch up. When he ran too slowly, Gobi would nip at his heels.

“For a little dog, she’s got a massive heart,” he said.

Dion Leonard and Gobi the dog ran 126 km together in China

Looking to bring Gobi back to Edinburgh with him, Leonard began a crowdsourcing campaign in August that drew worldwide attention and raised more than CAD$61,000 to cover the $8,600 for Gobi’s medical and quarantine fees. While Leonard tried his best to bring Gobi home, the dog stayed with friends in China.

But on Aug. 15, Gobi ran out an open door and was lost in the crowded city of Urumqi. Leonard flew back to China and began a furious campaign to track Gobi down, stopping short of putting the dog’s picture on the back of milk cartons. Beginning at 5 a.m. every morning, his team posted flyers, interviewed the locals, stalked dog parks and shelters and continued attempting to spread the word through social media.

Gobi has been found! More details to follow but safe & well! I’m overjoyed! Thank you for all support!! https://t.co/lCSUE06fz1

Dion Leonard (@Oh_Yes_Please) August 24, 2016

“It was going to be a needle in a haystack but I had to go see if I could find her,” Leonard said.

Throughout the search, some Urumqi residents did their best to keep Leonard’s spirits up, telling his team they were doing their best to search for Gobi. But those times were mostly dark, he said, with some threatening to steal Gobi and others raising his hopes with false sighting reports. Leonard admits the search was “testing my will to get up every day and stay positive about it.”

Finally, ten days after she went missing, a man contacted Leonard and his team to tell them he had found the dog in a park. But it was late and Leonard was exhausted. He didn’t want to leave his hotel.

But Leonard did follow up. And when his eyes met the stray dog’s, Gobi frantically ran around the room and jumped into his arms. Leonard couldn’t hide his goofy grin when they posed for a photo that was posted to Twitter.

Having only previously requested a few days off of work, Leonard flew back to Scotland to ask for a sabbatical from his job as a manager with a company that distills Scottish whisky. Leonard returned to China to spend four months with Gobi during the quarantine process.

When it came time to journey home, Leonard still refused to be separated from Gobi and insisted she travel with him in business class. Because U.K. rules don’t allow that, a 13 and a half hour flight from Beijing to Edinburgh became a 41-hour odyssey. The duo travelled from Beijing to Paris on a plane, drove to Amsterdam, took an overnight ferry to Newcastle and reached Edinburgh by car on Jan 3.

Dion and Gobi wave goodbye to China.

The transition from China to Scotland has had its bumps. Leonard owns a pet cat, Lara, and it didn’t appreciate the new addition to the family. Between his wife, Lara and Gobi, there are now three women vying for his attention in the household, he joked.

Dion and Gobi stop to pose for a phone at the Scottish border.

“I normally have the cat on one arm and Gobi on the other arm,” Leonard said. “My wife is a bit jealous now.”

For Gobi and Leonard, their story ends how it began. Having settled down to life in Scotland, Leonard couldn’t resist taking Gobi for a run through Arthur’s Seat in Edinburgh. The two have traded in the lifeless, rocky tundra for the evergreen hills of Scotland. The two may even race again in the future, Leonard hinted. For now, he’ll be occupied with writing their story in both a hardcover release and a children’s picture book that will be published by HarperCollins.

“I’ve gone from executive to over-qualified dog sitter,” Leonard said, laughing.

During their 41-hour trip home from Beijing, Leonard asked told Gobi to “stick with me.” If she did, Leonard promised that she’d have a great life in Edinburgh. Now he looks forward to sharing that life together.

“It’s been a beautiful story for a 2016 when there wasn’t much else to smile about.”