Get breaking news alerts and special reports. The news and stories that matter, delivered weekday mornings.

Ted Cruz's campaign has yanked an attack ad against rival Republican contender Marco Rubio after it was revealed that it featured a former softcore porn actress.

Cruz's campaign said in a statement to NBC News on Thursday that it was swapping the commercial with a new one after learning about actress Amy Lindsay's background:

"The actress responded to an open casting call. She passed her audition and got the job. Unfortunately, she was not vetted by the casting company. Had the campaign known of her full filmography, we obviously would not have let her appear in the ad. The campaign is taking the ad down and will replace it with a different commercial.”

Lindsay has said she’s a supporter of Cruz’s conservative Christian values. Cruz, meanwhile, is trying to stake his campaign in the upcoming South Carolina primary by winning the evangelical vote.

Let our news meet your inbox. The news and stories that matters, delivered weekday mornings. This site is protected by recaptcha

In the nixed commercial spot, seven supporters of Cruz sit in a therapy session circle and talk about regrets they had when they previously voted for Rubio.

One man laments voting for Rubio, whom he describes as a "Tea Party hero" who betrayed the movement when he backed amnesty for undocumented immigrants.

An unidentified woman — later revealed to be Lindsay — responds: "Maybe you should vote for more than just a pretty face next time."

Lindsay, who grew up in Houston and lives in Los Angeles, tweeted late Thursday that she was "extremely disappointed" that Cruz's campaign decided to pull the national ad.

Extremely disappointed the #TedCruz campaign pulled the national television spot I had a role in... #moretocome #myvotecounts — Amy Lindsay (@amylindsayLA) February 12, 2016

She did not say whether she has stopped supporting the Texas senator in his presidential bid. His campaign got a boost with a first-place finish in the Iowa caucuses and a decent third-place finish in the New Hampshire primary.

Lindsay told BuzzFeed News, which first reported the story, that she had initially thought the filmmakers knew about her past work.

Her resume includes more than a dozen softcore porn titles, according to her IMDB page, including "Carnal Wishes" and "Secrets of a Chambermaid." She also has had bit roles in more mainstream TV shows, such as "Star Trek: Voyager" and "Silk Stockings."

She remains open about her past filmography, and apparently doesn't shy away from others linked to the adult film industry.