HALIFAX -- Nova Scotia singer-songwriter Gordie Sampson was browsing Instagram when he made an unexpected and stunning discovery: The Backstreet Boys were singing one of his country songs.

Sampson -- an artist with a remarkable penchant for penning hit songs -- had no idea the 90s heartthrobs were collaborating with Florida Georgia Line on "God, Your Mama, and Me," a tune he co-wrote with two country music troubadours.

Even after hearing its final cut during a chance encounter at a Nashville recording studio, Sampson was oblivious to the boy band's unlikely inclusion on the song, which is now topping country charts in the United States.

"I went from hearing the final version of our song ... to reading an Instagram post about how the Backstreet Boys were singing on "God, Your Mama, And Me." We had no insider industry information. It was just like, 'Here it is,"' said Sampson, suggesting the inclusion of the pop group may have been a last-minute decision.

"I never would have guessed it in a million years. It was unbelievable ... I was thunderstruck."

It's the latest earworm from the Cape Breton-born, Nashville-based songwriter, who has churned out countless hits for country heavyweights including Faith Hill, Keith Urban, Trace Adkins, LeAnn Rimes, Martina McBride and Willie Nelson, to name a few.

Sampson, 45, earned a Grammy Award in 2007 for Carrie Underwood's "Jesus Take The Wheel," which he co-wrote with Nashville cohorts Brett James and Hillary Lindsey.

Lindsey teamed up with Sampson yet again for their latest hit, along with fellow Grammy Award-winner Josh Kear.

The trio are a Nashville songwriting dream team.

"We usually write in groups of three, so when the other two people you're working with are as good as Hillary and Josh, it's a very special thing," Sampson said in a baritone voice.

But when you write more than 100 songs a year, it's hard to tell what will become a hit, said Sampson.

"You think they're all great after you write them. There's always a honeymoon phase," he said. "But this one had stirred up an amazing first reaction."

He had shopped it around to some of the Nashville stars listed in his iPhone, but they didn't bite.

"There's a simpatico between the song you just wrote and the person who needs it. That has to line up. They're making it a hit, not you," said Sampson, who has released albums and performs regularly. "It has a lot do with timing and so many different things."

Sampson was driving through Ohio from Nashville en route to Cape Breton -- as he does every summer with his wife and daughter -- when he learned "God, Your Mama, And Me" had reached No. 1 on the U.S. country charts.

Months earlier, Sampson had popped into a Nashville recording studio to pick up a guitar and, by chance, ran into Canadian producer Joey Moi, who had worked for years with rockers such as Nickelback and Default.

"I said, 'Hey, I think you might have worked on one of my songs.' And he said, 'Oh man, that's your song? Come here. You've have to hear this.' ... At that time, they hadn't added the Backstreet Boys vocals. But it was already a great song," said Sampson.

He admits that after the initial shock wore off, he was "nervous" about the Florida-bred boy band's involvement and how traditional country radio would receive it.

But the harmony of the Backstreet Boys is helping to make the upbeat love song a success. "God, Your Mama, And Me" is the 13th No. 1 single for Florida Georgia Line, a country duo from Florida. It's their third single from the 2016 album "Dig Your Roots."