The two congressmen spent most of the first half of the one-hour debate discussing security issues, signaling a noticeable shift in the focus of a campaign which had largely centered on domestic issues prior to the bombings that killed three people and wounded more than 200 last Monday. Both candidates suspended their campaigns after the attack and are only now returning to the trail with a little more than a week remaining until the April 30 primary.

Lynch began the debate by striking an aggressive tone, faulting Markey for voting against a federal law that allowed for the establishment of a national Joint Terrorism Task Force that pools resources of federal, state, and local law enforcement agencies. Such a task force helped investigate the bombings in Boston.

"I don't know how you are going to spin this," Lynch said to Markey during a sharp exchange. "I voted yes, you voted no. That's the fact."

Markey struggled to remember or explain his vote on the task force, saying that he might have had questions at the time about whether the administration of then-President George W. Bush would support cooperation between the various agencies.

"I support the creation of the Joint Terrorism Task Force," Markey said. "I don't know the specific set of circumstances at that moment." After the debate, he emphasized that he fully backed the actions of the Boston task force that were widely praised for the investigation that led to the killing of one suspect and the capture of another.

Markey's campaign issued a press release later Monday night describing his vote against the creation of the national Joint Terrorism Task Force, which was established in July 2002, as a "principled objection to military involvement In law enforcement."

Lynch also questioned Markey's vote against a port security bill, though Markey explained that he only voted against an earlier version of the bill that did not include screening for nuclear materials. He said he supported the measure once that was added.

Markey also boasted about several measures he supported or authored that he said enhanced security including the screening of air cargo for bombs and the screening of tankers coming into U.S. ports for nuclear materials.

"I had to fight the Bush administration and I had to fight the industries that did not want to put the safeguards around those facilities that we knew were at the top of the al-Qaida terrorist target lists," he said. "And I was successful in putting those laws on the books that protect us today."

The candidates were asked about the installation of more security cameras in urban areas and the possible effect that would have on privacy.

Markey said it was time to consider installing more security cameras, like the ones that helped the FBI in the investigation of the Marathon bombing, in major urban areas like Boston.

"I do believe it is now time for us to consider more surveillance cameras. We see how helpful those surveillance cameras are," Markey said.

But Lynch urged caution, saying cameras should only be used "in places where people would not otherwise expect a high level of privacy."

When the debate at WBZ-TV shifted back to domestic policies, Lynch remained on the attack. At one point Lynch accused Markey of not doing enough to help local fishermen, saying "I'm with the fishermen, you're with the fish."

Another time, Markey responded to a flurry of criticisms from Lynch by saying "Steve is putting so many red herrings out here we're going to have to put out an aquarium."

Lynch challenged Markey's claim of having led the effort to break up the telecommunications monopoly, paving the way for increased competition and technological innovations for consumers.

Lynch, a South Boston Democrat, noted that just two cable companies, Comcast and Verizon, still control the lion's share of business in the eastern U.S. and that parts of the state are still without broadband, sharply limiting their viewing choices.

But Markey, a Malden Democrat, reiterated that he best reflects the views of Democratic voters likely to vote in next week's primary.

"I'm running to make sure the voices of the people of Massachusetts are going to be heard," he said.

Both candidates agreed after the debate that last week's events have changed the dynamic of the campaign.

"We are trying to be respectful for the victims," said Lynch, adding that campaigning after the tragedy felt "awkward."

"We have to be sensitive to the totality of the environment in which we are now campaigning," said Markey.

The debate came as a poll of 480 likely voters found that both Markey and Lynch hold double-digit leads over each of the three Republican candidates — former U.S. Attorney Michael Sullivan, Norfolk state Rep. Daniel Winslow and Cohasset businessman Gabriel Gomez.

Markey leads Gomez by 15 points, Sullivan by 18 points, and Winslow by 19 points while Lynch leads Gomez by 32 points, Sullivan by 32 points, and Winslow by 36 points according to the poll.

The poll was conducted by the Western New England University Polling Institute from April 11-18 and had a margin of error of plus or minus 5 percentage points.