Arizona Senate candidate J.D. Hayworth (R) launched his most aggressive attack of the primary campaign against Sen. John McCain (R-Ariz.) Friday. 

The former congressman released his second TV ad of the race, which accuses McCain of supporting an “amnesty bill” for undocumented U.S. residents. 

The ad features footage of McCain and President Obama talking about the effort to get immigration reform through the Senate.

“I helped author with Senator Kennedy comprehensive immigration reform and fought for it twice,” McCain says in the footage. It then transitions to Obama saying, “I stood with Ted Kennedy and John McCain and took on this tough issue.”

With immigration overshadowing the primary race, this ad is probably Hayworth’s best shot at closing the gap with the incumbent senator. Early voting, however, starts on July 29, which doesn’t give it much time to sink in.

The ad went up statewide Friday; it’s airing on broadcast and cable. It was produced by the Strategy Group for Media. 

McCain's camp was quick to fire back.

"It's laughable for Congressman Hayworth to try and sell himself as a leader in the fight to secure our border just days after he viciously attacked Pinal County Sheriff Paul Babeu, who is on the front lines of Arizona's battle against drug and human smuggling," Brian Rogers, a spokesman for McCain, said in a statement. "How can Arizonans accept Hayworth as a border security hawk after he tried to smear Sheriff Babeu — a man who will be charged with enforcing SB 1070 — as a racist? That dog won’t hunt."

Hayworth recently likened Babeu to "infamous KKK leader David Duke" in a statement after the sheriff appeared on on the white nationalist radio program Political Cesspool. Babeu, who's appeared in two TV ads for McCain, said he regretted granting the interview. 

--Updated at 6:48 p.m.