Dick Clark, the ever-youthful television host and producer who helped bring rock ‘n’ roll into the mainstream on “American Bandstand” and celebrated New Year’s Eve with the masses each year in Times Square, died Wednesday in Santa Monica, Calif. He was 82.

Clark had a heart attack at Saint John’s Health Center, where he had gone Tuesday for an outpatient procedure, according to his agent, Paul Shefrin.

Dubbed “America’s oldest living teenager” for his boyish good looks, Clark made appearances even after he suffered a stroke in 2004 that impaired his speech and movement.

In the late 1950s and early 1960s, “American Bandstand” influenced popular culture much like today’s “American Idol.” Philadelphia-area teenagers who danced on the TV program became national celebrities. Songs they said had “a good beat” during the “Rate-a-Record” segment shot up the pop charts.

“He shaped what it meant to be a teenager back then,” said Cindy Bullens, the Grammy-nominated rocker from Cumberland, who performed on “American Bandstand” and was one of many Mainers who mourned Clark’s passing on Wednesday.

“Watching ‘American Bandstand’ was how you found out what kids were wearing, what they were listening to, how they were dancing — the stroll, the twist, all that stuff,” said Bullens, 57, who grew up in Massachusetts and Maine and watched “American Bandstand” with her older siblings.

Bullens met Clark a few times. Her former brother-in-law, Bob Crewe, who produced and co-wrote several hits for the Four Seasons, was a close friend of Clark’s. Bullens performed two songs from her second album, “Steal the Night,” on “American Bandstand” in 1981.

“I was nervous and excited to go on the show, like anyone would be,” Bullens recalled. “Dick Clark walked into the dressing room, asked me a few questions and talked about Bob. He totally put me at ease. He was an extremely nice man and he helped to launch hundreds of careers.”

Clark’s clean-cut appearance and strict dress code for “American Bandstand” — jackets and ties for boys, skirts and no tight tops for girls — helped to make rock ‘n’ roll music acceptable to middle America. He regularly booked black artists and insisted that black couples be allowed to dance alongside whites, providing U.S. viewers with some of the first mainstream images of ethnic diversity.

During the show’s 30-year run on ABC, from 1957 to 1987, Clark interviewed more than 10,000 guests and showcased artists such as Chuck Berry, Jerry Lee Lewis, Chubby Checker, the Doors, Janis Joplin, the Jackson 5, Madonna, Talking Heads and Prince.

“He broke down the generation gap, because parents tuned in, and he broke down racial divides, because he had black acts on the show,” said Tony Boffa, 62, of Westbrook, head of the nine-piece Tony Boffa Band.

In the late 1960s, Boffa performed regularly on “The Dave Astor Show,” Portland’s version of “American Bandstand.” It was the latter that inspired Boffa to spend his life making music.

“Everyone watched it, boys and girls,” Boffa said. “I saw all those pretty girls and knew that’s what I wanted. It’s one of the reasons I decided to do what I do.”

Behind the scenes, Clark was one of the savviest entrepreneurs in television history. Founded in 1957, Dick Clark Productions created “The Golden Globes,” “The American Music Awards,” “The Academy of Country Music Awards,” “Dick Clark’s New Year’s Rockin’ Eve,” the “Bloopers” franchise, “The $10,000 Pyramid” game show and its many spinoffs.

Among many awards during a half-century on the air, Clark was inducted into the Rock and Roll Hall of Fame and the Academy of Television Arts & Sciences Hall of Fame.

Born in Bronxville, N.Y., on Nov. 30, 1929, the second son of Richard Augustus and Julia Barnard Clark, he graduated from Syracuse University, married three times and had three children.

His professional image was tarnished in 1959, when Congress investigated a possible conflict of interest between his broadcasting career and his investments in publishing and recording companies. He was forced to testify about “payola,” the widespread practice of paying disc jockeys to play songs.

Clark admitted to accepting jewelry and a fur from a record company. Though he wasn’t found to have done anything illegal, ABC executives told him he had to sell his outside interests or leave “American Bandstand.” Clark chose to divest his publishing and recording holdings, worth about $8 million.

After ringing in the New Year for more than 30 years, starting in 1972, Clark had a stroke in December 2004 that forced him to miss the annual ABC telecast. A year later, Clark was back on the air, counting down to 2006 as the ball dropped in Times Square.

Some viewers found it disconcerting to see the host in an impaired state. Others, especially stroke victims, lauded his courage and called him an inspiration. Clark continued co-hosting the New Year’s telecasts with “American Idol” host Ryan Seacrest, who did most of the talking.

“I do the best I can and have been encouraged to continue because I hear it serves to inspire many others,” Clark told USA Today in 2010.

Seacrest said Wednesday that he was “deeply saddened” by Clark’s death.

“I idolized him from the start, and I was graced early on in my career with his generous advice and counsel,” Seacrest said. “He was a remarkable host and businessman and left a rich legacy to television audiences around the world. We will all miss him.”

Staff Writer Kelley Bouchard, The Associated Press and Bloomberg News contributed to this report.