J.D. Hayworth Uses Dead Sen. Ted Kennedy In Attack Ad Against John McCain (VIDEO)

J.D. Hayworth, who is vying to unseat Sen. John McCain in Arizona's Republican Senate primary, is out with a new campaign ad accusing his rival of standing with President Obama and the late Sen. Ted Kennedy on immigration.

The 30-second spot set to air statewide features footage of McCain saying, "I helped author with Senator Kennedy comprehensive immigration reform and fought for it twice." The clip is followed by video of President Obama saying, "I stood with Ted Kennedy and John McCain and took on this tough issue."

In fact, McCain and Kennedy co-sponsored a bipartisan immigration bill introduced back in 2005. FactCheck.org reports:

That bill (S 1033) would allow people who are in the United States illegally to apply for a temporary worker visa after paying a $1,000 fine. Eventually they could gain permanent residence status after paying another $1,000 fine and working in the United States for six years under the temporary visa.

Last week when Hayworth attacked McCain over the immigration issue at a primary debate, the GOP incumbent fired back and insisted he's never supported amnesty.

"John wants us to now believe, in his own words, that he was never for amnesty," Hayworth said in a statement. "But the truth is in this ad. John was for amnesty yesterday, today and will be for it tomorrow."

WATCH: Hayworth Campaign Ad: McCain Stood With Kennedy, Obama On Immigration