The Republican candidate for U.S. Senate in New Mexico released a campaign ad on YouTube that attacks President Barack Obama’s recent vacation on Martha’s Vineyard and includes an image of the man who beheaded American journalist James Foley. Allen Weh, a former Marine colonel and the GOP nominee running against U.S. Sen. Tom Udall, D-N.M., refused to apologize for the video, which was posted Monday, amid criticism the spot, believed to be the first to reference Foley’s beheading, was done in poor taste.

The ad is filled with images of Obama playing golf juxtaposed with scenes of the crisis in Ukraine, ISIS militants and Foley’s apparent murderer holding up a knife. It also includes a clip of Udall from September 2013, in which he calls the “diplomatic path” of Obama’s foreign policy “a good one.”

Weh’s campaign told ABC News the ad is only appearing on its YouTube channel and not television. The Udall campaign called the campaign video “offensive.”

"James Foley's death is a tragedy, and to use his killer’s horrific image for personal gain in a campaign ad is reprehensible and appalling," Udall campaign manager Daniel Sena said in a statement sent to ABC News. "If Allen Weh wants to talk about the issues with New Mexico voters, he should find a way to do it that is respectful and substantive. Using James Foley’s horrific and tragic death for shock value is offensive to Mr. Foley's family, New Mexico voters and the rest of our country."

The Weh campaign has stood behind the ad.

"Out of respect for the Foley family, no picture of James Foley was used. Tom Udall’s feigned outrage over the inclusion of a now familiar image of this Jihadi terrorist, who is clearly the face of the evil that threatens our nation,” Weh campaign manager Diego Espinoza said in a statement to ABC News. “Senator Udall’s comments about our diplomacy being 'good' reflect his naiveté and inexperience in matters of national security.”