The video highlights Gomez's ties to a nonprofit that criticized President Obama's handling of the Osama bin Laden killing, and notes that the group, the Special Operations OPSEC Education Fund, has ties to the Tea Party.

The group released a video last year that accused the president of jeopardizing national security by leaking information related to the killing.

It features news clips covering the controversial group, for which Gomez acted as spokesman, and closes with Gomez himself on the campaign trail.

"I'm a new kind of Republican," he says. The video follows with the words "not really."

Markey's campaign isn't spending any money to promote the video, but it's an indication of the line of attack he'll have to take to keep the seat in Democratic hands.

As he said in the clip, Gomez is working to appeal to unenrolled voters by framing himself as a "new kind of Republican," one not bound by party ties.

Massachusetts is a true-blue state, breaking with more than 60 percent of the vote for Obama in 2012, and Gomez will have no chance if he's unable to distance himself from the GOP and if Markey's attempt to frame him as anti-Obama works.

Lenny Alcivar, a senior adviser to the Gomez campaign, hit back at Markey on the video, defending Gomez's association with the group that criticized Obama and framing Gomez as bipartisan in his criticism of intelligence leaks.

"Republicans, Democrats and Independents all agree with Gabriel Gomez and Senators like Democrat Dianne FeinsteinDianne Emiel FeinsteinFive things to know about the elephant trophies controversy The feds need to be held accountable for role in Russia scandal Lawyer: Kushner is 'the hero' in campaign emails regarding Russia MORE (Calif.) and Republican John McCainJohn Sidney McCainTrump's dangerous Guantánamo fixation will fuel fire for terrorists Tech beefs up lobbying amid Russia scrutiny Ad encourages GOP senator to vote 'no' on tax bill MORE (Ariz.) — America cannot afford national security leaks that jeopardize the lives of our men and women in combat. If career politician Edward MarkeyEdward (Ed) John MarkeySenate Democrats introduce bill to block Trump's refugee ban FCC votes to limit program funding internet access for low-income communities Two GOP senators oppose Trump’s EPA chemical safety nominee MORE supports security leaks that jeopardize the safety of our men and women in uniform, he should say so today," he said.

National security has come to the forefront of the campaign in recent weeks, following the Boston marathon bombing, and Gomez's campaign is looking to portray Markey as soft on the issue — an attack used to some advantage by Markey's primary opponent, Rep. Stephen Lynch (D-Mass.), in the final weeks of the campaign.

Republicans are using those attacks in their own Web video, issued by the Massachusetts Republican Party, which features clips of Lynch from the candidates' final televised primary debate in which he called Markey a "liar."

"Almost every Democrat, almost every Republican in Congress, this is after 9/11. It is mystifying that Mr. Markey can now say that he is a champion of homeland security," he says in the video.

The video is part of a wider strategy from the Massachusetts GOP in the Senate race. They're hoping, one strategist said, to cut into Markey's support by drawing away Lynch supporters.

"If we can get Lynch supporters to either stay on the couch all campaign long, or get some to stay home on election day or get a few to cross over, we improve our chances," the strategist said. 

Conor Yunits, a spokesman for Lynch, said the campaign would "very much like [the Massachusetts GOP] to stop using" footage of Lynch, and added that the primary fight had helped Markey.

"We think that Congressman Lynch's critiques of Congressman Markey helped make him a better candidate and strengthened his campaign," he said.