Toby Keith, a hit country crafter of pro-American anthems who riled up critics and was loved by millions of fans, died Monday in Oklahoma. He was 62.

The “Should’ve Been a Cowboy” singer-songwriter, who had stomach cancer, died peacefully surrounded by his family, according to a statement on the country singer’s website. He announced his cancer diagnosis in 2022.

The 6-foot-4 singer broke out in the country boom years of the 1990s, writing songs that fans loved to hear. Over his career he publicly clashed with other celebrities and journalists and often pushed back against record executives who wanted to smooth his rough edges.

He was known for his overt patriotism on post-9/11 songs like “Courtesy of the Red, White and Blue,” and boisterous barroom tunes like “I Love This Bar” and “Red Solo Cup.” He had a powerful booming voice, a tongue-in-cheek sense of humor and a range that carried love songs as well as drinking songs.

Among his 20 No. 1 Billboard hits were “How Do You Like Me Now?!,” “As Good As I Once Was,” “My List” and “Beer for My Horses,” a duet with Willie Nelson. His influences were other working-class songwriters like Merle Haggard, and he tallied more than 60 singles on the Hot Country chart over his career.

Throughout the cancer treatments, Keith continued to perform, most recently playing in Las Vegas in December. He also performed on the People’s Choice Country Awards in 2023 as he sang his song “Don’t Let the Old Man In.”

“Cancer is a roller coaster,” he told KWTV in an interview aired last month. “You just sit here and wait on it to go away. It might never go away.”

He was born Toby Keith Covel on July 8, 1961, in Clinton, Oklahoma. He’s the second of three children of Carolyn Joan (Ross) Covel and Hubert K. Covel Jr.

Keith worked as a roughneck in the state’s oil fields as a young man, then played semi-pro football before launching his career as a singer, playing music with his band throughout the red dirt roadhouse circuit in Oklahoma and Texas.

Eventually his path took him to Nashville, Tennessee, where he attracted the interest of Mercury Records head Harold Shedd, who was best known as a producer for the hit group Alabama. Keith released his platinum debut record “Toby Keith,” in 1993. “Should’ve Been a Cowboy,” his breakout hit, was played 3 million times on radio stations, making it the most-played country song of the 1990s.

Keith often wore his politics on his sleeve, especially after the terrorist attacks on U.S. soil in 2001, and early on he said he was a conservative Democrat, but later claimed he was an independent. He played at events for Presidents George W. Bush, Barack Obama and Donald Trump, the latter giving him a National Medal of the Arts in 2021.

Keith, who sang “Courtesy of the Red, White and Blue (The Angry American),” had a public feud with the Chicks (formerly known as the Dixie Chicks), who became a target of his ire when singer Natalie Maines said the band was ashamed of then-President George W. Bush. He went on 18 USO tours to play for troops serving overseas. He also helped to raise millions for charity over his career, including building a home in Oklahoma City for kids with cancer and their families.

Keith is survived by his mother; his wife of 39 years, Tricia Keith; two daughters, Shelley Covel and Krystal Sandubrae; a son, Stelen; a sister, Tonnie; a brother, Tracy; and four grandkids.

The New York Times contributed.