By Rory Carroll

April 25 (Reuters) - Dale Earnhardt Jr., NASCAR's most popular driver, said on Tuesday that he will retire after the 2017 season, a major loss to a sport already suffering from diminished star power and waning popularity.

Earnhardt's career includes a record 14 consecutive NASCAR Most Popular Driver Awards in addition to two Daytona 500 victories and 26 overall Cup points-paying victories.

But a severe concussion kept the 42-year-old out of the driver's seat for the last half of the 2016 campaign and he told reporters on Tuesday that he had time during his rehab to consider how and when to end his storied career.

"I just wanted to opportunity to go out on my own terms," he said.

He stressed that he would not be detaching himself from the sport completely.

"I want to be part of the future of this sport for many, many years to come," said Earnhardt, the son of Hall of Fame NASCAR driver Dale Earnhardt Sr., who died in a crash at Daytona in 2001.

Earnhardt on Tuesday received praise and support from fellow drivers as well as NASCAR Chairman and CEO Brian France.

"Dale Earnhardt Jr. is among the most recognizable athletes in the world, unequivocally serving as the sport's most popular driver for more than a decade," France said in a statement.

"We're excited about the next chapter of his NASCAR career and wish him success for the remainder of 2017."

Earnhardt is the latest in a string of NASCAR stars to call it quits, including Carl Edwards, Jeff Gordon, and Tony Stewart.

Earnhardt's retirement comes as NASCAR struggles to attract new fans to a sport with an aging fan base and declining attendance and television ratings.

NASCAR's television viewership from a decade ago is down 45 percent, according to an analysis of Nielsen ratings by SportsBusiness Daily, a trade publication quoted in an article in the Wall Street Journal in February.

But it is not all doom and gloom, according to Andrew Campagnone, a partner at Sports Marketing Consultants, who said Earnhardt's retirement should not put a significant dampener on the sport given the driver's continued commitment to its future.

"The sport will see a little down tick with his retirement as the hard core fans may not watch or attend as much," Campagnone told Reuters on Tuesday.

"I don't think it will hinder NASCAR's effort right now in trying to lure in the younger fan as Dale will still be an Earnhardt, and he will be on social media and other forms that fans will be able to latch onto."

In December it was announced that Monster Beverage Corp would replace telecommunications company Sprint as the new title sponsor of the cup series, a move designed to broaden the appeal of stock-car racing to the millennial generation.

But the energy drink maker got in at a deep discount, settling on a two-year deal worth about $20 million per season, less than half the nearly $50 million Sprint had been paying, according to media reports.

Earnhardt refuted the idea that NASCAR was in decline and cited up-and-coming drivers Kyle Larson and Chase Elliott as examples of drivers with raw talent and colorful personalities.

He said the ability of the new batch of drivers to connect with fans on social media was critical in an age when fans expect to have a more personal connection to their favorite professional athletes.

"They are going to bring a lot of new color and excitement and energy to this sport," he said.

"We just got to get them in front of fans and let fans get to know them and the rest will take care of itself," he said.

"The sky is the limit for NASCAR," he said. "I'm super excited about the future."

(Reporting by Rory Carroll in San Francisco; Editing by Andrew Both) ((Rory.Carroll@thomsonreuters.com; office 415-344-6093 cell 503-830-8017; Reuters Messaging: rory.carroll.thomsonreuters.com@reuters.net))