After days of tough questioning, Republican Gabriel E. Gomez went after his Democratic rival for US Senate, saying US Representative Edward M. Markey has been absent from the campaign trail and “hiding” from the controversies roiling the Democratic administration in Washington, D.C.

“We’re in the midst of probably the worst scandals of a lifetime down in D.C.,” Gomez said, citing the Internal Revenue Service’s targeting of conservative groups for audits, the Justice Department’s seizure of media phone records and the administration’s conflicting reports on Benghazi.

“Where has Congressman Markey been on all this stuff? I don’t know. He’s been hiding,” Gomez said, after campaigning at Mul’s Diner in South Boston.

While public attention is focused on major Washington controversies, Gomez said, Markey has been attacking him, launching a new TV ad that focuses on guns. Gomez suggested that Markey was trying to tie him to the Newtown school massacre.

“Thirty-six years I guess, you lose some sense of civility or sense of decency,” Gomez charged, referring to Markey’s long tenure in Congress, actually 37 years. “Even for him to go this low and try to tie me to the Newtown massacre is below the low,” Gomez said.

The ad notes that Gomez opposes an assault weapons ban and does not favor “banning high-capacity magazines, like the ones used in the Newtown School shooting.” But it fails to note that Gomez, during his primary campaign, supported the compromise measure that the US Senate put forth to try to quell gun violence in the wake of Newtown -- a bipartisan measure requiring background checks for all gun sales.

“I bucked the special interest groups on that and I fully supported the Toomey-Manchin bill,” said Gomez, referring to the senators who forged the compromise, which was ultimately unsuccessful.

Markey’s campaign spokesman Andrew Zucker said in a statement: “If Gabriel Gomez considers it a ‘negative’ to highlight his opposition to banning deadly assault weapons and limiting high-capacity ammunition magazines, then maybe he should rethink his positions, which are out of step with Massachusetts families.”

Gomez said he does not personally own guns but that he has a “unique perspective” on weapons, having fired many of them during his time as a Navy SEAL.

“He has never even been close to any of these things,” Gomez charged of Markey. “He doesn’t understand them.”

Gomez explained his opposition to an assault weapons ban by saying that the past ban, which has expired, failed to deter gun violence.

“It’s not the weapon. It’s the person who has the weapon,” Gomez said, saying that’s why he preferred background checks to an assault-weapons ban.

Gomez, a first-time statewide candidate, endured a challenging week on the campaign trail that was suddenly picking up media attention. He faced a barrage of questions from reporters about a tax break he enjoyed on his Cohasset home and difficult issues of abortion and contraception that posed political problems for his party last year.