(photo: Owen Sweeney/Invision/AP, File)

Country legend Merle Haggard, often called “the Poet of the Common Man,” whose music reflected his hardscrabble roots and hard-living ways as well as a tenderness that made him a revered songwriter, has died at his home near Redding, Calif. He was 79.

The Associated Press confirmed his death.

Haggard along with fellow Bakersfield, Calif., superstar Buck Owens defined the West Coast sound of country music in the 1960s and ’70s.

Emerging from the central California city’s raucous honky-tonky country music scene of the post WWII-era, first recording for the local Tally label and then for Capitol Records, Haggard became a towering figure, producing 38 chart-topping records along with his longtime recording and touring band, the Strangers. Among his biggest hits were the controversial “Okie From Muskogee” — alternately seen as a reactionary Nixon-era anthem or a good-hearted spoof of heartland mores — as well as enduring and much-covered ballads such as “Today I Started Loving You Again,” “If We Make It Through December,” “Sing Me Back Home” and “Hungry Eyes.” His uptempo “drinking” songs such as “The Bottle Let Me Down,” “Swingin’ Doors,” “I Think I’ll Just Stay Here and Drink” and “Working Man Blues” helped create the prototype of 1960s and ’70s country honky-tonk hits.

Two of his best-regarded albums were tributes to early country star Jimmie Rodgers (“Same Train, A Different Time,” 1969) and Western swing bandleader Bob Wills (“A Tribute to the Best Damn Fiddle Player in the World,” 1970).

Haggard scored with several film and TV hits over the years, most notably penning and singing the eponymous theme song for the 1974 TV series “Movin’ On,” as well as chart-toppers “Barroom Buddies” and “Misery and Gin” for Clint Eastwood’s film “Bronco Billy.” “Mama Tried” was featured in the crime film “Killers Three,” in which Haggard also co-starred.

Haggard was born in Oildale, Calif., to Oklahoma immigrants who migrated west during the Great Depression, and he quite literally grew up in a boxcar, albeit one converted into a home. His father died when Haggard was 9, and in his early life he committed a series of petty crimes, leading to longer and longer incarcerations. But Haggard was also gaining a reputation in the Bakersfield area as a first-rate singer and instrumentalist. Holding his own onstage with his idol, country music great Lefty Frizzell, was an indication of the career ahead of him, once he put crime and punishment behind him.

A botched robbery, however, saw him tried as an adult and sent to San Quentin, where he spent three years. Haggard recalled that seeing Johnny Cash onstage in San Quentin in 1958 was a particular inspiration, and the two men later became close friends and mutual fans.

Once out of prison, Haggard worked blue-collar day jobs and played the rowdy honky-tonks of Bakersfield at night, which led to him cutting several tracks for Tally.

Haggard’s first released song was the minor hit “Skid Row.” A cover of country superstar Wynn Stewart’s “Sing a Sad Song” charted nationally in 1964. The following year he had his first national top-10 record with “(My Friends Are Gonna Be) Strangers,” followed in 1966 by his first No. 1 song, “I’m a Lonesome Fugitive.”

Haggard, in a 1999 interview with Variety, described his rise as he moved from local music sensation to national star after signing with Capitol Records: “We had this little label in Bakersfield (Tally) that we were doing pretty good on. About 1964, I think it was, we sold forty-something-thousand records out of our apartment back before the interweb (sic) and all that s—. So Capitol called us and said, ‘Don’t you think it’s time you let us help you?’

“They were also disappointed in everything but the Beatles. There was nothing in the world selling except Beatle music. Every country act in the entire f—ng world had just got fired. And it just so happened that during that really strange Beatlemania I got a goddamn hit.”

The ’60s and ’70s were Haggard’s peak period creatively and professionally. Haggard scored hits for three labels — Capitol, Epic and MCA — before turning to independent label status in the late ’90s. He briefly returned to Capitol (via its Nashville division) in the new millennium, and released a collaborative album with Willie Nelson, “Django and Jimmie,” through Sony Legacy in 2015; the latter set reached No. 1 on the country chart and No. 7 on the pop side.