The Massachusetts Senate candidates squared off in their first televised debate on Wednesday night, an aggressive exchange that saw both candidates hold their own, but neither delivered a knockout blow needed to ensure a win just three weeks out from Election Day.

The exchange most likely to prevail past Wednesday night was Republican Gabriel Gomez and Rep. 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's (D-Mass.) back-and-forth on abortion, which came in the final 10 minutes of the debate.

In response to a question from the moderator, Gomez expressed support for a 24-hour waiting period for abortions and said he'd be willing to support an anti-abortion Supreme Court nominee.

"If a judge comes in front of me, and they follow the constitution, and they're ethical, and they're pro-choice, and they've done a good job, I'll vote for them," he said.

Gomez is personally against abortion, though he insisted Wednesday night, as he has throughout the campaign, that he won't change any laws on abortion.

But Markey pounced on the comments, as Democrats have sought to make Gomez's position on women's issues a problem for him in recent days, holding a conference call with Democratic National Committee Chairwoman Debbie Wasserman Schultz (Fla.) on his positions on abortion and the healthcare reform law last week.

"If [a Supreme Court nominee is] pro-life and you vote for them, they're going to have the ability to overturn Roe v. Wade and that's your vote. And you just said to the women of this state that you could support, and you would support, a Supreme Court nominee who could do that. And I don't think that serves the best interests of the women in this state," he said.

And within a half hour of the debate, Planned Parenthood had condemned Gomez, and the Democratic Senatorial Campaign Committee blasted out a video of the exchange.

Women's issues contributed to former Sen. Scott Brown's (R-Mass.) loss in 2012, after he had trouble defending his opposition to healthcare coverage for contraceptives in the final debates.

The candidates also sparred on issues ranging from gun control to healthcare reform, to the Washington scandals and immigration reform.

Though Markey hammered Gomez within the first 10 minutes of the debate for his opposition to a ban on assault weapons and high-capacity magazines, Gomez pledged his support for the Toomey-Manchin background checks bill that failed in the Senate earlier this year.

Gomez's most strident offense came during the candidates' back-and-forth on healthcare reform. Hammering Markey for passing what he characterized as a flawed bill, he said that reform should've been left up to the states and that "you always trust the federal government in everything that you think about."

"You spend your time down in D.C. where the economy is booming, unemployment's low, the number of lobbyists is going up, and the people who are spending all their time in D.C. living in a cocoon, where they forget how the rest of the country and how their state actually operates. They never understand that just because things are going well in D.C. doesn't mean they're going well everywhere else, up here in Massachusetts," he said.

Both stayed largely on-message, with Markey attempting to tie Gomez to the "Tea Party Republicans" and "Newt Gingrich Republicans," while Gomez rarely missed an opportunity to characterize Markey as a creature of Washington and note his long tenure in Congress.

In his opening statement, Gomez told Markey, "After 37 years in Washington, welcome back to Boston," a knock on Markey's residency. He spends much of his time in Maryland, though he claims his residency in his hometown of Malden, Mass. And throughout the debate, Gomez charged Markey was too partisan for Massachusetts, at one point calling him the "most hyper-partisan congressman in the last 40 years."

Gomez has characterized himself as a "new kind of Republican," independent of the national party and a fighter for Massachusetts.

Markey has led his Republican opponent in every poll of the race, and while he's heavily favored to win, Gomez has kept his lead to single-digits in most polls, boosting Republican hopes that they can take the seat.

The Wednesday night exchange is the first of three televised debates in advance of the June 25 special election to replace Secretary of State John KerryJohn Forbes KerryTrump's dangerous Guantánamo fixation will fuel fire for terrorists Tech beefs up lobbying amid Russia scrutiny Overnight Tech: Senate Dems want FCC chief recused from Sinclair merger | Tech rallies on Capitol Hill for DACA | Facebook beefs up lobbying ranks MORE (D).