The roots of Ted Cruz’s attack on Donald Trump’s “New York values” run deep.

According to Andy Kroll’s profile in the New Republic of Jeff Roe, the man behind Cruz’s campaign, this particular line of attack bears some very strong similarities to an ad Roe concocted in 2008 to bring down Kay Barnes, a Democrat running against Rep. Sam Graves of Missouri.

The Democrat had attended a fund-raiser in San Francisco hosted by Democratic House leader Nancy Pelosi, providing fuel for the spot Roe unleashed in the spring of 2008. Set against images of streetcars and a flamboyantly dressed black man dancing at a club with two women holding cocktails, the spot depicted Barnes as a far-out liberal with “San Francisco style values” who fund-raised with Pelosi and became a darling of “West Coast liberals by promoting their values, not ours.”

As Kroll notes, the ad was “blasted as homophobic and borderline racist.” But it worked, and Graves held on to his seat. Watch it here: