CHARLOTTE, N.C. — Lowe's said Wednesday it will end its sponsorship of seven-time champion Jimmie Johnson at the end of the season and leave NASCAR.

Johnson made his Cup debut in 2001 with Lowe's and he's never had any other company as his primary sponsor. Through 18 years Johnson has won a record-tying seven titles, 83 races and built a Hall of Fame career representing the Lowe's brand.

"The No. 48 team is a valuable property and has been an integral part of building the Lowe's brand, which makes today's decision difficult as we now look to invest in other strategic initiatives," Lowe's chief customer officer Michael P. McDermott said in a statement.

Lowe's probably stayed in the sport longer than expected because rival Home Depot left NASCAR after the 2014 season. Menards is still in NASCAR, and while the Lowe's funding helped Johnson and Hendrick Motorsports find success, there is not much of a rivalry in the marketing space.

This is the first time since Rick Hendrick inked the Lowe's deal in 2001 that he has Johnson available to shop to sponsors. The car has almost never had open inventory available for a company to attach its name to the greatest driver of his generation.

"Jimmie is one of the greatest champions and ambassadors in all of sports and still at the top of his game," Hendrick said. "This change opens up all kinds of possibilities, and we look forward to having conversations with potential new partners. It's a special opportunity with an iconic athlete and team."

Lowe's was one of the very few sponsors in NASCAR that still funds the majority of a driver's 38-race schedule. The company signed on when Jeff Gordon persuaded Hendrick to take a chance on Johnson, and Hendrick sold the idea to Lowe's. The relationship was instantly successful, even though Lowe's had hedged its bets in initial contract negotiations.

The company initially also signed on as an associate sponsor for Jeff Gordon in case Johnson was a bust and Lowe's needed Gordon as a brand ambassador. When Lowe's signed an extension with Johnson in 2015, the company admitted the partnership had felt like winning the lottery.

Johnson won the pole as a rookie for his first Daytona 500, and was a winner by race 10. In 2002 he won three times, finished fifth in the standings and was well on his way to stardom.

Johnson's first of five consecutive titles came in 2006, and he quickly surpassed teammate Gordon as the most dominant driver of the decade.

Along with crew chief Chad Knaus, the No. 48 Chevrolet team is one of the best in stock car history. Their seven championships equals Hall of Famers Richard Petty and Dale Earnhardt, and in 2009 Johnson was the first ever driver named Associated Press Male Athlete of the Year.

Johnson is 42 and signed with Hendrick Motorsports through 2020.

"I'll always be grateful to Lowe's for taking a chance on me and believing that I could win," Johnson said. "I'm not sure where I'd be right now if they hadn't committed to the No. 48 team. It's hard to see them move on, but we've made history together and celebrated so much success on and off the track.

"I have more to accomplish in this sport. I feel the best I've ever felt physically. I'm motivated. I'm focused on winning races and chasing more championships. Someone will be a big part of writing that story with us. I'm not going anywhere."