FILE - In this Thursday, May 25, 2017 file photo, Danica Patrick stands by her car before qualifying for Sunday's NASCAR Cup series auto race at Charlotte Motor Speedway in Concord, N.C. Danica Patrick is done at Stewart-Haas Racing and her future in NASCAR is now up in the air amid a sponsorship shake-up. Patrick posted a statement on her Facebook page Tuesday, Sept. 12, 2017 saying her time with Stewart-Haas “had come to an end” due to a new sponsorship arrangement for the team next season. (AP Photo/Chuck Burton, File)

In this Saturday, Nov. 21, 2015 file photo, Danica Patrick arrives at the garage after practice for Sunday's NASCAR Sprint Cup Series auto race at Homestead-Miami Speedway in Homestead, Fla. Danica Patrick is done at Stewart-Haas Racing and her future in NASCAR is now up in the air amid a sponsorship shake-up. Patrick posted a statement on her Facebook page Tuesday, Sept. 12, 2017 saying her time with Stewart-Haas “had come to an end” due to a new sponsorship arrangement for the team next season. (AP Photo/Darryl Graham, File)

FILE - In this Saturday, Aug. 5, 2017 file photo, Danica Patrick watches during practice for Sunday's NASCAR Cup Series auto race in Watkins Glen, N.Y. Danica Patrick is done at Stewart-Haas Racing and her future in NASCAR is now up in the air amid a sponsorship shake-up. Patrick posted a statement on her Facebook page Tuesday, Sept. 12, 2017 saying her time with Stewart-Haas “had come to an end” due to a new sponsorship arrangement for the team next season. (AP Photo/Matt Slocum, File)

FILE - In this July 2, 2016, file photo, Danica Patrick greets fans during driver introductions before the start of the NASCAR Sprint Cup auto race at Daytona International Speedway, in Daytona Beach, Fla. Danica Patrick is done at Stewart-Haas Racing and her future in NASCAR is now up in the air amid a sponsorship shake-up. Patrick posted a statement on her Facebook page Tuesday, Sept. 12, 2017 saying her time with Stewart-Haas “had come to an end” due to a new sponsorship arrangement for the team next season. (AP Photo/Wilfredo Lee, File)

CHARLOTTE, N.C. (AP) — Danica Patrick, the only female driver at NASCAR's top level, is likely at the end of her driving career after a sponsorship shake-up left her without a ride at Stewart-Haas Racing.

Patrick posted a statement on her Facebook page Tuesday saying her time with Stewart-Haas "had come to an end" due to a new sponsorship arrangement for the team next season. The statement came shortly after Smithfield Foods said it will leave Richard Petty Motorsports to become a primary sponsor at Stewart-Haas next year.

The news is a blow to RPM, which is also losing driver Aric Almirola. But it also forced changes at Stewart-Haas, which has struggled with sponsorship for three of its four cars, including the No. 10 Ford driven by Patrick.

"It has been my honor to drive for Tony Stewart, Gene Haas and everyone at Stewart-Haas Racing for the past six seasons," Patrick wrote. "Sponsorship plays a vital role in our sport, and I have been very fortunate over the course of my career, but this year threw us for a curve."

Patrick, whose participation in NASCAR has always been polarizing given the attention she receives despite her lack of success, closed the post by writing: "I have the utmost faith in myself and those around me, and feel confident about my future."

Patrick has launched a clothing line, has a book coming out next year and has made a huge transition into promoting a healthy and fit lifestyle. It has her positioned for a second career at the age of 35 if she chooses. She's also in a long-term relationship with fellow driver Ricky Stenhouse Jr., who will make his debut in the playoffs this weekend.

Sponsorship dollars have been hard to come by for a number of drivers and teams. Smithfield's decision leaves Petty's team in need of a sponsor, and Almirola is looking for a ride.

But the bigger changes are clearly underway at SHR, which didn't reveal where Smithfield will be in the organization in 2018.

"Details of the agreement, including the driver who will be added to SHR's Monster Energy NASCAR Cup Series lineup in 2018, will be provided at a later date," SHR said in a statement.

That means Smithfield could end up on the car Patrick has driven. Clint Bowyer and Kurt Busch both need sponsorship on their cars, too. Busch, the Daytona 500 winner, does not have a deal with SHR for next season.

Both Harvick and Busch will represent SHR in the 10-race playoffs that begin Sunday at Chicagoland Speedway.

Now that Patrick has confirmed she's out at SHR, the team could choose to downsize to three cars, or pursue Almirola, Matt Kenseth, Kasey Kahne or any other available driver. The team could be in the market to replace just Patrick, or both Patrick and Busch.

Patrick has driven for Stewart-Haas Racing her entire Cup career. She has seven top-10 finishes in 180 career starts and is currently 28th in the standings, the lowest in her Cup career.

Still, she won the pole for the 2013 Daytona 500, won an IndyCar race in 2008, is the highest finishing female driver in Indianapolis 500 history with a third-place run in 2009 and is the only woman to lead laps in both the Indy 500 and the Daytona 500. Patrick is the only woman to win a Cup pole and those top-10 finishes are the most of any female Cup driver.

"She will go down as the best female NASCAR driver of all time. Will likely take decades to see anyone even challenge her legacy," Brad Keselowski posted on Twitter. He later added in a second post: "Have come to accept that mankind never knows or appreciates what it has until its gone. NASCAR fans will miss her badly in time."

Patrick's contract with SHR ran through 2018, but the team has been searching for sponsorship since Nature's Bakery abruptly ended its three-year deal after one season.

RPM is now in a similar bind because it lost Smithfield, which has been associated with Petty the last six years. RPM this year downsized to one Cup car because of sponsorship reasons, and talks on a contract extension with Almirola stalled when Smithfield began looking at other options.

Petty ripped the company and suggested he was blindsided.

"Over the past few months, Smithfield had continually told me they wanted to be with us, and I recently shook hands on a deal to extend our relationship," Petty said. "I come from a time when we did major deals with sponsors like STP on a handshake. I'm sad to see this is where we are now. This decision is very unexpected, and we are extremely disappointed in this late and abrupt change of direction."

Smithfield CEO Kenneth M. Sullivan called Petty's claim of a handshake deal "unequivocally and patently false," and accused the team of not delivering on "tens of millions of dollars of unwavering financial support."

"Smithfield's numerous discussions with RPM over the past several months focused exclusively around one issue: RPM's inability to deliver on the track and the organization's repeated failure to present a plan to address its lack of competitiveness," Sullivan said in a statement. "It is very unfortunate and disheartening that RPM has chosen to disseminate false statements regarding our communications to NASCAR fans who we have supported wholeheartedly with more than a $100 million investment in the sport over the last several years."

Almirola was 20th in the standings when he broke his back in May. It caused him to miss seven races, and the team is currently 25th in the standings. He did make NASCAR's playoffs, in 2014, after he won at Daytona in July.

Petty, the Hall of Fame driver and seven-time NASCAR champion, is no longer the primary owner of his race team. Andrew Murstein of Medallion Financial Corp. is the majority owner of the team.

Petty said he and Murstein were committed to "moving forward" with the No. 43 team.

"Losing a sponsor of this magnitude in September is a significant set-back to Richard Petty Motorsports," Petty said. "We've been around since 1949, and we'll be around a lot longer."