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 FeinsteinGOP senators introduce bill to prevent family separations at border Dem plays audio from child detention center on Senate floor 13 GOP senators ask administration to pause separation of immigrant families MORE (Calif.) and Republican John McCainJohn Sidney McCainOvernight Defense: States pull National Guard troops over family separation policy | Senators question pick for Afghan commander | US leaves UN Human Rights Council 13 GOP senators ask administration to pause separation of immigrant families McCain, Coons: Trump should withdraw controversial refugee nominee MORE (Ariz.) — America cannot afford national security leaks that jeopardize the lives of our men and women in combat. If career politician Ed MarkeyEdward (Ed) John MarkeyLawmakers prep for coming wave of self-driving cars Trump taps Hill veteran for White House environment job Dems unveil push to secure state voting systems 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.