Country music has always been known for its relatable tales of love and loss set against backdrops of hometowns, dive bars and winding roads.

But it’s not only the songs that are filled with stories — it’s the singers and songwriters, too.

Documentary filmmaker Ken Burns and his team spent 8½ years interviewing 101 country experts (including legendary artists such as Willie Nelson, Loretta Lynn and Charley Pride) for “Country Music,” a new eight-part, 16-hour series premiering Sunday at 8 p.m. on PBS. The show goes deep on the popular personalities and humble trailblazers who shaped this influential and popular genre.

“The songwriter Harlan Howard said, ‘Country music is three cords and the truth,’ ” Burns tells The Post. “He’s admitting that it’s elemental. It doesn’t have the sophistication and complication of classical music or some forms of jazz. But it does have the truth.”

Here are just a few of the many surprising true stories spotlighted in the fascinating documentary series.

Parton ways

Dolly Parton’s 1974 classic “I Will Always Love You” — which would reach a far larger audience in 1992 with Whitney Houston’s cover — isn’t actually about saying goodbye to a romance. Parton had risen to fame on “The Porter Wagoner Show” and was ready to move out from underneath Wagoner’s controlling thumb. He threatened to sue her, Parton recalls in the documentary, so she wrote the song as a way of expressing to him that it was time for her next chapter. After Parton sang it for him, Wagoner was in tears and told her she could leave if she let him produce the record, which was ultimately released a few months after her departure from the show.

“I submit that when you understand why she wrote it, and to whom she wrote it and how it was received,” says Burns, “her version then elevates to at least equal to Whitney Houston’s superb pop version.”

Rocky Rhodes

Many a country star got started in the business by moving to Nashville, Tenn., and working whatever job he or she could find to get close to the action. “Chattahoochee” singer Alan Jackson worked in the mailroom at the country music TV channel TNN. “King of the Road” troubadour Roger Miller was a bellhop at the Andrew Jackson Hotel. And Kris Kristofferson, who had been a Rhodes Scholar at Oxford, swept floors as a janitor at Columbia Records.

“If that’s what it took, that’s what he was willing to do,” series producer and writer Dayton Duncan tells The Post of Kristofferson, who cut his teeth listening in on Johnny Cash’s sessions before scoring big hits of his own, such as 1973’s “Why Me,” and writing hits for others artists, including “Sunday Mornin’ Comin’ Down” (made famous by Cash) and “Me and Bobby McGee” (a posthumously released No. 1 hit for Janis Joplin).

Family feud

Fans of the pioneering group the Carter Family — comprised of husband and wife A.P. and Sara and A.P.’s sister-in-law Maybelle — would have been shocked to learn that Sara filed for divorce from A.P. in 1936, even as they kept up appearances by recording and performing together.

“The Carter Family is supposed to be the embodiment of Sunday morning [ideals] but has this incredible, melodramatic love affair,” says Burns.

Fed up with A.P. and their life in Maces Spring, Va., Sara had fallen for A.P.’s cousin Coy Bayes, but Bayes’ parents grew concerned and soon swept him away to California.

Years later, in February of 1939, while the Carter Family was playing live on a border-blaster station in Del Rio, Texas, Sara dedicated a song, “I’m Thinking Tonight of My Blue Eyes,” to Bayes by name. More than 1,600 miles away in Greenville, Calif., Bayes heard the shout-out and discovered his mother had been hiding letters from Sara. He booked it to Texas, and the star-crossed couple were married within days of his arrival.

Clef notes

Jimmie Rodgers, country music’s original superstar, and Hank Williams, dubbed the Hillbilly Shakespeare, are two of the genre’s brightest luminaries. But neither could read music.

Marty Stuart, who is a major voice in the documentary and is known for early ’90s hits such as “Hillbilly Rock,” tells The Post he can’t, either.

“So many . . . of us work out of our heart and our head and are not educated musically,” he says. “The best I could tell you is it’s just a divinely ordered gift.”

Band on the run

One of the biggest feuds in country music history dates back to 1948 when Lester Flatt and Earl Scruggs left Bill Monroe and the Blue Grass Boys, to go out on their own. In retaliation, Monroe kept them from performing at the fabled Grand Ole Opry for years.

According to Stuart, who joined Flatt’s band in 1972, Monroe and Flatt eventually put their differences behind them when they discovered that the two of them back together on a bill could earn them a lot of money. But by then, Flatt and Scruggs were no longer speaking to one another. Stuart intervened just before Flatt’s death from heart failure in 1979.

“I went and saw Earl and told Earl the circumstances,” says Stuart. “Unannounced, Earl walked into Lester’s hospital room, and they settled up.”

Behind bars

Although Johnny Cash famously sang in 1955 about shooting “a man in Reno, just to watch him die” on his hit “Folsom Prison Blues,” he never did hard time. He did, however, perform in 1958 at San Quentin State Prison, where among the inmates watching was none other than a young Merle Haggard, locked up for a burglary.

“There are certain moments in the history of country music that you just couldn’t make up,” says Duncan, series producer and writer, laughing.

Inspired by Cash, Haggard would eventually get out of prison and become a superstar himself. His 1968 chart-topper “Mama Tried” included the true-to-life lyric that he “turned 21 in prison,” though clearly, he wasn’t “doing life without parole.”