(Corey Stewart)

Republican gubernatorial hopeful Corey Stewart won a battle this weekend with a TV station that initially refused to air an ad with an image of President Trump’s bloodied head.

Stewart, a supporter of the president who was chairman of his Virginia campaign for most of last year, tried to launch the ad Friday, just days ahead of Tuesday’s three-way GOP primary.

Titled “Unhinged,” the 30-second spot incorporates a photograph of comedian Kathy Griffin holding a bloody mask of Trump’s head — a graphic stunt that generated fierce blowback.

“Donald Trump’s the president, and unhinged liberals can’t handle it. Who’ll stop them? Ed Gillespie won’t,” the ad begins, referring to one of Stewart’s rivals in the primary.

Meet the candidates running to become Virginia’s next governor

On Friday, NBC12 sales manager Rodney Bryant emailed Rick Shaftan, a political operative for Stewart, to say the commercial could not air.

“We can’t air the Stewart spot,” Bryant wrote. “We feel that the spot is not appropriate to air due to the image of President Trump’s bloodied face. Even if it’s blurred we don’t feel it’s appropriate to air. Do you have another spot?”

Shaftan pushed back: “You need to call me immediately,” he wrote. “You cannot censor candidate ads. Have you discussed this with your legal counsel yet? You might want to do that, and then apologize to me.”

By Saturday, the station had reversed course.

“After consultation with counsel, the station determined that the spot could air because it was endorsed by the candidate,” the station said in a written statement to The Washington Post. “Our only concern was the depiction of the image of the decapitated head of a president. The spot will air as scheduled.”

Stewart, who is chairman of the Prince William Board of County Supervisors, faces former Republican national party chairman Ed Gillespie and state Sen. Frank Wagner (Virginia Beach) in the GOP primary.

(Dalton Bennett/The Washington Post)

The winner will square off in November against either Lt. Gov. Ralph Northam or former congressman Tom Perriello, who are competing in Tuesday’s Democratic primary.

Griffin posed with the mock severed head for a photo shoot, from which images were posted by the photographer. After coming under heavy criticism from the president and other, she apologized for making those images, but she later said Trump and his family were trying to “ruin my life forever.”

Due to the negative publicity created by the image, Griffin was fired by CNN and reportedly has lost other gigs, as well.