Sen. Mark Warner (D-Va.), right, answers a question as his Republican opponent Ed Gillespie listens during the Virginia U.S. Senate debate on Oct. 7, 2014 in McLean, Va. (Ricky Carioti/The Washington Post)

Sen. Mark R. Warner and his Republican challenger, Ed Gillespie, each promised to bring greater independence to an elected body paralyzed by partisan gridlock in a lively debate broadcast Tuesday evening from the suburbs of Washington.

Yet Warner and Gillespie both reverted to familiar partisan attacks in a debate dominated by divisive issues such as gay marriage, immigration and abortion. In front of an audience of Northern Virginia business leaders, the two candidates deployed well-worn charges and slogans — and avoided the kind of headline-grabbing revelations or attacks that might shake up a race in which Warner, according to recent polls, holds a commanding if shrinking lead.

Even as he emphasized his position in the “sensible center” and distanced himself from President Obama, Warner was quick to draw contrasts on same-sex marriage, birth control and the environment. It’s a sign of how the self-described “radical centrist” has adapted to the explosive population growth in the more liberal northern pockets of the state.

Gillespie emphasized Warner’s ties to an unpopular president and health-care law as well as a Democratic Party that is on the defense nationally, while Warner painted his rival as a “partisan warrior.”

Asked by moderator Chuck Todd of NBC News how he has bucked his own party, Gillespie said he thought Republicans had gone “overboard” in the 1990s in imposing mandatory minimums for federal crimes. He said he also supported “banning the box” that felons must check on many job applications, “for certain crimes and for certain jobs.”

“I’m someone who believes in redemption — and in reconciliation,” he said.

Gillespie also said he accepts the legalization of gay marriage in Virginia although he opposes same-sex unions.

“It is the law in Virginia today,” he said of the Supreme Court’s decision Monday to let stand several federal court decisions in favor of same-sex marriage. “Of course I accept the ruling.” He agrees with Warner, he said, that there should be no federal same-sex marriage ban, though he acknowledged that as chairman of the Republican National Committee in 2004 he stood for a platform advocating such a ban.

The candidates met in an office building auditorium in one of Virginia’s most thriving business districts, Tysons Corner. The debate, sponsored jointly by NBC4 and the Fairfax County Chamber of Commerce, came on the same day that a new poll found Warner holding a smaller but still commanding lead over Gillespie.

The survey, from the Wason Center for Public Policy at Christopher Newport University, shows likely voters favoring Warner by 12 points, 51 to 39 percent. Gillespie’s support appears to have grown over the past month: In several polls, the gap between the candidates has shrunk. The last Wason Center poll, in early September, found Warner leading by 22 points. The senator remains well-positioned for reelection, however, putting pressure on Gillespie to use Tuesday evening’s debate to his advantage.

Despite a challenging national forecast for Democrats driven by dissastisfaction with the economy and the White House, Warner has maintained an advantage not only with voters of his party but also with independents and some conservatives, according to the CNU poll and others. A popular former governor in a state that has grown even more blue since he was first elected, Warner holds an advantage on a broad range of issues from health care to energy policy.

Gillespie, however, has gained ground with independents.

At the debate, Warner ticked off a list of policies on which he had bucked his party — offshore drilling, the Keystone XL pipeline, foreign policy in Iraq and Russia. Asked how he felt about Senate Majority Leader Harry Reid (D-Nev.), he responded, “We could perhaps do better in both parties.”

The senator also made a surprise proposal. Arguing that unlimited campaign spending has contributed to unbridled partisanship, Warner suggested the two candidates agree to bar outside groups from any further involvement in the race.

“Let’s have this race between you and me,” Warner said.

Gillespie laughed incredulously, calling Warner’s suggestion “classic” and indicating that he found it disingenuous.

“Your super PAC has spent $1.5 million on your behalf,” Gillespie said, while the senator interjected that Gillespie is the “granddaddy of super PACs” for his work helping to found the influential Republican committee Crossroads GPS with Karl Rove, the former adviser to President George W. Bush.

“I haven’t had a penny, I haven’t had a penny spent!” Gillespie responded, laughing again. “I just find it humorous.”

It was one of several interactions suggesting that each candidate has gotten under the other’s skin. Both used the debate to contest issues raised in the previous debate — and to decry the attack ads that have begun to flood the airwaves.

Warner called Gillespie’s proposal to make birth control available without a prescription a “gimmick” that would take contraceptives out of most insurance plans and make them more expensive.

“He’s been supported by the major anti-choice groups around the country,” Warner said. “He wouldn’t answer in the last debate about whether he wants to overturn Roe v. Wade.”

Warner also alleged that Gillespie’s “whole campaign has been pretty much based on [a] bogus charge” that he voted with Obama 97 percent of the time.

That claim, Warner emphasized, is based on only the fraction of votes on which the president has taken a position at all.

Gillespie defended the allegation, noting that Politifact rated the attack “true.”

“Senator Warner’s press releases are very bipartisan, but his floor votes are very party line,” he said. “One of the reasons he takes arrows from both sides is because he says one thing but votes the other way.”

When Warner pressed Gillespie on immigration, accusing him of changing his position, the challenger again cited Politifact, saying the fact-checker found he had been “entirely consistent.”

Warner also tried to beat back the charge that 250,000 Virginians would lose their health insurance under the Affordable Care Act, saying it was described as “simply false.” He said he was committed to making changes to the law, including letting people keep their plans for three years, creating a cheaper “copper plan” option and rolling back “regulatory overburden.”

“We need to fix this problem, not simply re-litigate it,” he said.

Gillespie said he would detail his health-care policy in a speech this week. But, he said, “you don’t have to go far in the commonwealth to find someone who has had their insurance canceled and lost their doctor as a result of Senator Warner’s support for the Affordable Care Act.”

The candidates found a small piece of common ground on foreign policy, both saying Obama was wrong to rule out ground troops in Iraq. Gillespie agreed with Warner that there is “ample evidence climate change is occurring” and “man contributes to it.”

Warner argued that he was the only candidate who took climate change seriously. “He lobbies against fuel efficiency standards and he was a lobbyist for Enron,” he said. “I’m not sure that’s the approach that we need going forward.”

Even as they attacked each other, both touted crossover support, key in this swing state. Gillespie said many past Warner voters were coming to him, while Warner said he had more Republican support than when he first ran for office.

Both candidates will have another chance to make their case to voters — a final debate is scheduled for Oct. 13.