Dolly Parton and Kenny Rogers performing in Toronto in 1986Mike Slaughter / Toronto Star / Getty

In 1983, an R&B song written by a disco band became a pop sensation for two of the most legendary stars of country music. And it almost didn’t happen.

“Islands in the Stream,” by Kenny Rogers and Dolly Parton, is more than a timeless, genre-spanning love song that tends to surface around 1 a.m. at karaoke night. With the news of Rogers’s death on Friday at the age of 81, it’s reestablished itself as one of the most enduring and immediately recognizable pieces of the singer’s legacy. But when the chart-topping duet appeared on his 1983 album Eyes That See in the Dark—released the day after his 45th birthday—it defied all odds to become a hit.

Up to that point, Rogers’s solo career had ridden on a series of country hits that veered from the lovelorn novelty of 1977’s “Lucille” to the sumptuous balladry of 1983’s “Lady.” He’d had some moderate successes with duets—namely 1980’s “Don’t Fall in Love With a Dreamer,” with Kim Carnes, and 1983’s “We’ve Got Tonight,” with Sheena Easton. But these pairings with pop singers, as good as the results were, felt slightly contrived, like dates that never progressed beyond a polite cup of coffee. Rogers’s only long-term artistic relationship with a fellow country artist, Dottie West, had sputtered out after a string of singles in the late ’70s. By 1983, the last thing on his radar was a team-up with Dolly Parton.

Ironically, it took a disco icon to bring the two country legends together in the studio. “The first time I met Dolly Parton was in the 1970s. I was asked to perform on her television show in Nashville, simply called Dolly,” Rogers wrote in his 2012 memoir, Luck or Something Like It. “I would like to say that we became immediate friends, but we didn’t. I was just another guest in the mix of her very busy schedule.” But when Rogers tapped Barry Gibb of the Bee Gees in 1983 to produce his next album, Gibb had a flash of inspiration. It involved one of the album’s songs, “Islands in the Stream,” which Gibb had written with his Bee Gees bandmates and brothers, Robin and Maurice.

“I had worked on the song with Barry for at least four days, something I was not used to doing. I finally told him I didn’t even like the song anymore,” Rogers wrote. “Without breaking a stride he raised one finger in the air and said, ‘What we need is Dolly Parton.’”

As fate would have it, Parton wasn’t ensconced in Nashville. She was in Los Angeles, where Rogers and Gibb were recording. Forty-five minutes after Gibb’s epiphany, Parton walked through the door of the studio and got down to business.

“Baby, when I met you there was peace unknown / I set out to get you with a fine tooth comb / I was soft inside / There was something going on,” Rogers croons as the song oozes into existence. His voice is gruff and lonesome—that is, until Parton joins in on the next verse: “You do something to me that I can’t explain / Hold me closer and I feel no pain / Every beat of my heart / We got something going on.” Their harmony is otherworldly, an alloy of fierce and soft. Parton is the former; Rogers is the latter.

What follows is a monumental chorus that millions of YouTube plays can’t erode. “Islands in the stream / That is what we are / No one in between / How can we be wrong / Sail away with me / To another world / And we rely on each other, ah ha / From one lover to another, ah ha.” Rogers and Parton trade proclamations of undying commitment—“Too deep in love and we got no way out”; “We start and end as one”—with a vagueness that suggests a shy kind of mystery. The song is escapist. It’s borderline ridiculous. It’s also breathtaking.

With its sultry phrasing, bright brass, and synthesizer-based arrangement, “Islands in the Stream” strayed as far from traditional country as country royalty had ever dared before. The Texas drawl of Rogers and the Tennessee twang of Parton lend warmth and raw yearning to an otherwise twinkly sonic backdrop. That friction between soulfulness and sophistication is what sells it.

By his own admission, Rogers was always more of an R&B fan than anything else. “I grew up with Sam Cooke and Ray Charles and Clyde McPhatter and the Drifters,” he told the music journalist John Tobler in 1989. “My heart is with R&B music.” Gibb originally wrote “Islands in the Stream” with Diana Ross in mind, but the song ended up with Rogers and Parton.

The duo’s rapport blended Rogers’s scruffy charm and Parton’s glamorous fire. “I’ve lived through earthquakes in California, twisters in Kansas, and hurricanes in Georgia, but nothing prepared me for working with Dolly,” Rogers wrote in his memoir—although the most remarkable thing about “Islands in the Stream” isn’t its force, but its restraint. Few singers in any genre are as overwhelmingly distinct as Rogers and Parton. Yet they approach the song tentatively, even coyly, making their voices shimmer and interlace. Their chemistry is stable, not volatile. They simmer but never erupt. (Parton is quoted in Rogers’s book as saying, “We are what you call soul mates, or kindred spirits might be more accurate.” She added that their friendship produced moments that were “almost as if we were looking in a mirror.”)

The duet, in all its magic, wouldn’t have happened if Gibb hadn’t played musical Cupid. The song went to No. 1 on the Billboard Hot 100 and Rogers and Parton would go on to collaborate on numerous television specials and world tours, not to mention a second duet, “Real Love.” Middle-aged, gray-bearded, and paunchy, Rogers became an unlikely sex symbol—a tender yet rugged silver fox in the image-conscious era of MTV. At the same time, “Islands in the Stream” marked the peak of country’s love affair with pop in the ’80s, a shotgun marriage that wouldn’t be renewed until Garth Brooks and Shania Twain led a new generation of arena-packing country artists a decade later.

“Islands in the Stream” would prove to be Rogers’s last major pop triumph. He never came close to reaching that height on the charts again, although his tenure as a superstar continued unabated until his death. In a video posted to Twitter on Saturday, Parton had this to say of her late duet partner: “I loved Kenny with all my heart. My heart’s broken, and a big old chunk of it has gone with him today. And I think that I can speak for all his family, his friends, and his fans when I say that I will always love you.”

Rogers and Parton stumbled across a mutual magnetism that reenergized their careers and helped define a decade. The ’80s fostered every kind of musical crossover, from Eddie Van Halen shredding with Michael Jackson to Aerosmith jousting with Run-DMC. “Islands in the Stream,” though, didn’t shove genres together; it sought the sweet spot between them. And in doing so, it gave two country veterans a chance to reinvent the alchemy of the duet. “There is always the danger of being so closely associated with someone that you lose your own identity,” Rogers wrote of his time with Parton. “If I’m going to lose it, I want to lose it with Dolly.” That’s the power of “Islands in the Stream.” It’s an anthem to losing oneself in partnership, to dissolving the boundaries between souls—and to finding one’s voice in the voice of another.

We want to hear what you think about this article. Submit a letter to the editor or write to letters@theatlantic.com.