NEW YORK – Even as he endured grueling chemotherapy treatments to rid his stomach of cancer, Ronnie James Dio showed the fiery passion that made him a metal legend, flashing his famous devil’s horns signal as he lay in a hospital bed.

“This hasn’t really been a problem for me. Cancer? I’ll kick the hell out of you,” declared Dio in March in an interview with KIAH-TV in Houston, where he was being treated for the disease. “I refuse to be beaten in any shape or form so I’m going to beat you, too.”

But on Sunday, Dio — whose famous wailing vocals gave Black Sabbath a second life — succumbed to the disease, at age 67.

“Today my heart is broken,” Wendy Dio, his wife and a manger, wrote on the singer’s website. “Many, many friends and family were able to say their private goodbyes before he peacefully passed away.

“Ronnie knew how much he was loved by all,” she continued. “We so appreciate the love and support that you have all given us … Please know he loved you all and his music will live on forever.”

His publicist Maureen O’Connor said he died in Los Angeles.

Later Sunday, Black Sabbath bandmate Geezer Butler posted a picture of Dio on his website, with the caption: “Goodbye My Dear Friend.”

Dio revealed last summer that he was suffering from stomach cancer shortly after wrapping up a tour in Atlantic City, N.J., with the latest incarnation of Black Sabbath under the name Heaven And Hell.

Though Dio had recently undergone his seventh chemotherapy treatment, he was hopeful to perform again. Earlier this month, Heaven And Hell canceled its summer tour, but Dio did not view being sidelined as a permanent thing.

“Wendy, my doctors and I have worked so hard to make it happen for all of you, the ones we care so much about, that this setback could be devastating, but we will not let it be,” he said in a statement. “With your continued love and support, we … will carry on and thrive. There will be other tours, more music, more life and much more magic.”

Dio, who grew up in upstate New York in the town of Cortland, had his first taste of rock fame as the lead singer of the band Elf. From there, the spotlight grew, and in 1975, he became the first lead singer of Rainbow, the heavy metal band put together by guitarist Ritchie Blackmore, who had just quit Deep Purple. Dio recorded three albums with the group until creative differences led him to leave.

But there was another band that needed his help. In 1980, after Ozzy Osbourne left the hugely successful and groundbreaking metal band Black Sabbath, the band tapped Dio to fill his spot.

In an interview, Dio acknowledged how difficult it was to step into the shoes of such a famous frontman.

“Ozzy especially had some real staunch fans, and for someone else to come into Sabbath, God, that was sacrilegious,” he said.

Instead of serving as just a placeholder with the band, however, he united with them to create the album “Heaven And Hell,” considered by many critics to be one of the finest heavy metal albums ever.

His time with the band would be known as “Black Sabbath, the Dio years,” touching off an intense debate among fans as to which singer was the true essence of the band, a discussion that lasts even to this day.

His tenure with the band was on-and-off, though. His first stint with the band lasted only two years.

He also enjoyed a successful solo career with his self-titled band, Dio, in between his three runs with Black Sabbath (1980-82, 1992, and 2007-09, when the band toured as Heaven And Hell, to differentiate it from Osbourne-led versions of Sabbath).

Many of his most memorable songs revolved around the struggle between good and evil, including his signature tune “Heaven And Hell.” He also drew heavily on medieval imagery in songs like “Neon Knights,” “Killing The Dragon” and “Stargazer.”

Besides his growling voice, he became known for making the “devil horns” sign a heavy metal signature — a sign he said came from his Italian grandmother, who used it to ward off evil.

“He possessed one of the greatest voices in all of heavy metal and had a heart to match it,” said Twisted Sister guitarist Jay Jay French, whose band toured with Dio since 1983 and was to do so again this summer at European rock festivals. “He was the nicest, classiest person you would ever want to meet.”

Motley Crue’s Nikki Sixx, whose band toured with Dio, said he was shocked to learn of his death.

“Ronnie was one of the kindest souls I have ever met and his talent was beyond inspirational to so many of us,” he said in a statement. “I still have this image of him standing on stage in front of 100,000 belting out ‘Man on the Silver Mountain’ and remember the shivers it sent up my spine. He will be missed by all of us.

Dio organized an all-star charity collaboration in 1986 called “Hear N’ Aid” to raise money for famine relief in Africa, styled on the successful “We Are The World” campaign of a few years earlier.

His solo hits included “Rainbow In The Dark,” “The Last In Line” and “Holy Diver.”

His last album was Heaven And Hell’s “The Devil You Know,” released in April 2009.

In addition to his wife, Dio is survived by son Daniel, grandchildren Julie and Joey, and father Pat.