First he mocked the similarities in their biographies, calling Senator Marco Rubio “the Republican Obama.” Now, in an ad called “Sales Pitch,” Senator Ted Cruz is hammering Mr. Rubio for serving up the same talking points as President Obama’s.

After calling Mr. Rubio “the Republican Obama” at the end of an ad in Iowa, Mr. Cruz has spliced together clips of Mr. Obama and Mr. Rubio to make them sound like a skipping CD, repeating each other’s lines, during the legislative battle over a comprehensive immigration overhaul in 2013.

“They still have to qualify for it,” Mr. Rubio says, “meaning —”

“Passing a background check,” Mr. Obama says, seeming to finish the sentence. “Passed a background check,” Mr. Rubio echoes.