Landing a No. 1 song is a big deal for any artist, but it’s particularly surreal for country singer Chris Janson, who wasn’t even on a record label six months ago. Yet his song “Buy Me a Boat” hit the top of the radio chart this week — and the strange story of how it got there could make a pretty good country song of its own.

It was a serendipitous collision of factors that included a casual e-mail to an extremely popular radio DJ; support from a television executive; and one of the most powerful media companies in the country. But it’s also evidence of the challenges facing independent artists: Even with a decade of hard work, sometimes it takes a dash of good luck to get to the next level.

Janson, 29, like so many Nashville singer-songwriters scraping by, moved to Music City out of high school in 2006 from a small town in Missouri. After several years playing clubs and moving in songwriter circles, he landed a record deal — but walked away from it in 2010 and was dropped by his publisher. Eventually, he signed with another publishing house and label, and got a break in 2012 when a song he wrote, “Truck Yeah,” wound up as a Tim McGraw single. Janson released a few of his own singles, though none made an impact. Then his second label folded. In May 2014, he became an independent artist by default, doggedly playing live and building a fan base.

It took another year before “Buy Me a Boat” would change Janson’s life. He wrote the song with Chris DuBois during a songwriting session that Janson calls a “pretty quick and painless little adventure.” The two were talking about how no one would turn down the chance to be a millionaire. That led to the wry line: “I know what they say/Money can’t buy everything/Maybe so – but it could buy me a boat.” Janson produced the song himself and uploaded it to iTunes via TuneCore, a third-party agency that allows musicians to sell digital tracks.

Around March 2015, Janson played a charity event for Bobby Bones, the iHeartMedia syndicated country radio host with a morning show audience in the millions. Janson and his wife, Kelly (also his manager) already knew Bones, so the three caught up. Afterwards, Janson e-mailed him a copy of “Buy Me a Boat.” Bones loved it and played it on air – something that usually never happens with an unknown song. Bones announced to his listeners that Janson was a talented “underdog” who didn’t have a record deal, and they should give the song a chance.

Just a few hours later, “Buy Me a Boat” rocketed to the fifth-most popular country song on iTunes. The only person more shocked than Janson (who woke up to a stream of congratulatory messages) was Bones. Though he is known for gleefully getting in trouble for going rogue on the radio, Bones says he had no idea the song would blow up. He genuinely enjoyed the song – and his listeners just happened to like it, too. Bones spent the rest of the show with his co-hosts marveling as the song climbed to the No. 1 spot, and encouraged his listeners to keep downloading.

“I wish I could say I was smart enough to know that it would happen like that,” Bones says now, acknowledging that his company gives him “a little more leeway” in playing untested songs on air. “The crazy thing is I never wanted to be the guy that was trying to break new music. I just wanted to be the guy that entertains people.”

Everything after that went very fast: Fortuitously, Janson already had the attention of CMT (Country Music Television), which prides itself on discovering and promoting new country artists. Leslie Fram, the network’s senior vice president of music strategy, was a huge fan of Janson’s live concerts. Occasionally, she would meet with Janson’s wife and manager, Kelly. “She and I would have these quarterly breakfast meetings talking about why we could not understand why Chris Janson not being noticed in Nashville,” Fram said.

The Bones incident came at the perfect time to capitalize on Janson’s potential. Fram went to CMT president Brian Philips and pitched an offbeat idea: What if the network helped by funding a music video, giving “Buy Me a Boat” even more exposure? Before Fram could even finish her thought, she said, Philips replied: “Absolutely.”

It was the first time CMT ever gone so far to finance an artist’s music video. Executives surprised Janson with the news when he played a CMT event, and the announcement nearly brought him to tears. Out of all the struggling singer-songwriters out there, what was it about him?

“We have a lot of indie artists,” Fram said. “For some reason, we were just so touched by his journey that it just felt like the right thing to do.”

With the song a hit on iTunes and a fully-funded video, it wasn’t surprising in April when Warner Music Nashville announced they were signing Janson to a record deal. Nor was it a shock when iHeartMedia, with the largest reach of any radio outlet in America, quickly confirmed the following month that Janson would be the next recipient of the “On the Verge” program, which requires its hundreds of country stations to play the song a certain number of times per week. Soon, Janson had an opening spot on Toby Keith’s summer tour.

Now, Janson has the No. 1 song on country radio, successful enough that Warner Music has given the green light to his long-awaited debut album, out Oct. 30. “It just all came together so quick,” Janson said. “It’s been insane.”

That might be an understatement, considering how he experienced both sides of the success spectrum so quickly, all the dominos clicking in place just at the right moment.

“It was just a matter of time before people took notice in town,” Fram said, noting that there’s a stigma for artists who’ve done time on multiple labels without a hit. “But in Chris’s case, the talent was always there.”

Read more: