A presidential campaign ad by Ted Cruz promoting “conservative values” and attacking rival candidate Marco Rubio has accidentally starred a former porn actress, who said appearing in the spot was “cool.”

The Republican Texas senator, who has championed religious rights in his run for the White House, produced a 30-second spot featuring actress Amy Lindsay.

Earlier on Friday, Cruz spoke at the Carolina Values Summit, the biggest gathering of social conservatives in the state that is holding the next GOP primary on February 20.

.@tedcruz talks about faith & liberty at the Carolina Values event in Rock Hill, SC pic.twitter.com/sn4IKbfHB1 — Alice Stewart (@alicetweet) February 11, 2016

The ad showed a group of people attending an AA-style therapy session because they were disappointed with Senator Marco Rubio's stances on issues like immigration.

One man pipes up to say: “Well, I voted for a guy who was a Tea Party hero on the campaign trail and then he went to DC and played patty-cake with Chuck Schumer and cut a deal on amnesty.”

In the video, Lindsay tells the man: “Maybe you should vote for more than just a pretty face next time."

Reportedly unbeknownst to Cruz, in the 1990s Lindsay appeared in such porn films as “Carnal Wishes” and “Sex Sent Me to The ER.”

Cruz’s staff insisted that the campaign ad would never knowingly hire a porn actress. Trying to play the incident down, his press secretary, Catherine Frazier, said: “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.”

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

The campaign is taking the ad down and will replace it with a different one, the spokeswoman said.

Unfortunately for Cruz, the 30-second video was quickly shared by other YouTube users.

Sore loser? Trump accuses Cruz of 'stealing' Iowa caucus https://t.co/UWMXba6Zr3pic.twitter.com/Dahi6H2AmF — RT America (@RT_America) February 3, 2016

In an interview with BuzzFeed before the ad was removed, Lindsay said she is “a Republican and a Christian conservative,” and thought it was “cool” that a former porn actress could star in a Cruz ad.

“In a cool way, then hey, then it's not just some old, white Christian bigot that people want to say, 'It could be, maybe, a cool kind of open-minded woman like me,'” she told the website.

She also said that she has not done hardcore porn, and that she has also appeared in films that are not erotic.