NASCAR driver and team owner Ray Ciccarelli announced on Facebook Wednesday that he was leaving the sport due to a newly enacted ban on Confederate flags at races.

"Well it's been a fun ride and dream come true but if this is the direction NASCAR is headed we will not participate after 2020 season is over," Ciccarelli said in a statement on his Facebook page, which has since been deleted.

Ciccarelli cited the NASCAR ban on Confederate flags, which he described as a "political" move. Ciccarelli said he doesn't believe in kneeling for the national anthem and that NASCAR is hurting one group to appease another. He also said he doesn't actually care about the Confederate flag.

Ciccarelli was a part-time competitor in the NASCAR Gander RV & Outdoors Truck Series, driving the no. 49 Chevrolet Silverado for CMI Motorsports, which he owns. He competed in 18 races over three years, with one top-10 finish (at the 2019 Corrigan Oil 200), no wins, and no poles, according to CBS Sports, which posted his full Facebook statement before it was deleted.

CMI Motorsports has only run two Truck Series races so far this year, and Ciccarelli hasn't driven in a race since last year. At the time of publication, all of Ciccarelli and CMI Motorsports' public social media accounts had been taken down. Ciccarelli's tweet indicated he's going to sell the assets of his racing team.

NASCAR announced a ban on the display of Confederate flags Wednesday.

"The presence of the Confederate flag at NASCAR events runs contrary to our commitment to providing a welcoming and inclusive environment for all fans, our competitors and our industry," a NASCAR statement released on Twitter said.

The move came after Darrell "Bubba" Wallace, Jr., NASCAR's only African-American full-time driver, called for a ban on Confederate flags in a CNN interview Monday.

Hours after the ban was announced, Wallace, who races in NASCAR's top Monster Energy Cup Series, drove the no. 43 Richard Petty Motorsports Chevrolet Camaro ZL1 with a #BlackLivesMatter livery in a race at Virginia's Martinsville Speedway. He finished 11th.