Country music has long been closely linked to America's pro-gun lobby, but several stars have distanced themselves from the National Rifle Association following the mass shooting at a Texas school.

At least five country musicians, including "God Bless the USA" performer Lee Greenwood, pulled out of the NRA's annual convention that opened Friday in Texas. "American Pie" singer-songwriter Don McLean also withdrew.

Their initial billing highlights the close links between country music and the gun-supporting right in the United States, but experts say their withdrawal is indicative of shifting attitudes.

Country musician Lee Greenwood addressing the Conservative Political Action Conference 2022 in Orlando, Florida on February 27, 2022
Country musician Lee Greenwood addressing the Conservative Political Action Conference 2022 in Orlando, Florida on February 27, 2022 AFP / CHANDAN KHANNA

McLean, 76, said it would be "disrespectful and hurtful" to perform at the convention's "Grand Ole Night of Freedom" concert scheduled for Saturday after 19 students and two teachers were killed at an elementary school in the small town of Uvalde.

Greenwood, whose patriotic signature song regularly rings out at Donald Trump rallies, said he canceled "out of respect" for those mourning, while Larry Gatlin said he couldn't perform "in good conscience."

T. Graham Brown and Larry Stewart, lead singer of country band Restless Heart, also withdrew, according to statements carried by USA Today.

Crosses in memory of the victims of the Uvalde school shooting seen May 26, 2022
A 5th grade student was arrested by Lee County police in Florida after he allegedly made a mass shooting threat days after the Uvalde school shooting last week that rocked the country to its core. In photo: crosses in memory of the victims of the Uvalde school shooting seen May 26, 2022. AFP / CHANDAN KHANNA

Conjuring up images of stetson hats, cowboy boots and the Stars and Stripes flag, country has traditionally been the favorite music of conservative white Americans.

Its fan base is predominantly white, with roots in the largely Republican southern US states.

"Country music is not monolithic by any means," Professor Mark Brewer, who teaches a class on music and American politics at the University of Maine, told AFP.

A t-shirt on sale at the NRA convention in Houston in 2013
A t-shirt on sale at the NRA convention in Houston in 2013 Getty via AFP / JUSTIN SULLIVAN

"But I think it's safe to say that the predominant themes over the years have been more conservative, maybe with a hint of libertarian populism mixed in."

Brewer says there have been "longstanding connections" between country music, conservative politics, and gun culture. One of the reasons is geography.

"There's a big regional overlap. Country music has its origins in the American south and southern American politics have always been conservative.

"The United States as a whole has a pretty prevalent gun culture, but it's even more pronounced in the south," he added.

Demonstrators protest outside the National Rifle Association Annual Meeting at the George R. Brown Convention Center  in Houston, Texas on May 27, 2022
Demonstrators protest outside the National Rifle Association Annual Meeting at the George R. Brown Convention Center in Houston, Texas on May 27, 2022 AFP / Cécile Clocheret

Professor Joel Schwindt, who teaches country music history at the Boston Conservatory at Berklee, said the genre was "very specifically marketed" to white America from the start.

Adding to its appeal amongst white working class groups was a "firm support for the military."

Unlike Hollywood and the US pop music industry, which lean left, country music has plenty of conservative artists.

The musicians who withdrew from the NRA convention were careful not to criticize the gun body in their statements.

Stewart praised it as a "great organization" as he defended the US constitution's famous Second Amendment right to bear arms.

Numerous country musicians have called for more gun regulations though, including Eric Church, Jason Isbell, Maren Morris and Kacey Musgraves.

Several spoke out after a man opened fire from his hotel on a Las Vegas country music festival in 2017, killing 60 people in the deadliest mass shooting in modern US history.

Rosanne Cash, singer-songwriter and daughter of late country musician Johnny Cash, wrote an Op-Ed in the New York Times later that year calling on country musicians to stand up to the NRA.

"I think we've had more genuinely progressive stands in the last decade than we've probably ever had before," including on LGBTQ issues, said Brewer.

Although there are no conclusive studies, he thinks this might be because younger performers tend to be more progressive, as are the fans they are trying to attract.

Schwindt notes that while country music's fan base is primarily white, "regular listenership among non-white listeners, Black listeners and Hispanic listeners in particular, has grown pretty significantly over the past 10 to 20 years."

Could that lead to more country stars taking progressive stances in the future?

"It's something we're seeing more of," said Brewer. "I don't know if I'd say that's the dominant position still by any means. But it's becoming more and more visible," he added.