CHARLESTON, S.C. (AP) — With just two weeks to go before the first votes of the 2016 race for president, Democrats Hillary Clinton and Bernie Sanders engaged in their most contentious debate match-up to date, underscoring their tightening primary race as the Iowa caucuses draw near.

The pair tangled repeatedly Sunday night over who’s tougher on gun control and Wall Street and how to shape the future of health care in America.

Their heated rhetoric highlighted the central question fueling the increasingly competitive primary race: Will the Sanders passion beat out the Clinton practicality?

While Clinton remains the national front-runner, grassroots enthusiasm for Sanders’ outsider candidacy and his unapologetically liberal message has imperiled her lead in Iowa and expanded his advantage in New Hampshire.

“What this is really about is not the rational way to go forward,” Sanders said as he responded to Clinton’s argument that his health care plans would reignite a divisive political battle. “It’s whether we have the guts to stand up to the private insurance companies.”

Clinton derided as impractical Sanders’ ambitious aim to replace the country’s existing employer-based system of health care insurance with one in which the government becomes a “single payer,” providing coverage to all.

Instead, she urged a less-sweeping action to build on President Barack Obama’s health care law by working to further reduce out-of-pocket costs and control spending on prescription drugs.

“We have the Affordable Care Act,” she said. “That is one of the greatest accomplishments of President Obama, of the Democratic Party, and of our country.”

In doing so, she again cast herself as the natural successor to Obama and accused Sanders, until recently an independent, of being an unfaithful ally of the administration.

It’s a strategy aimed at locking down Democratic primary voters, particularly minorities, who make up a huge swath of the party’s base and remain devoted to Obama. But it’s a riskier approach in a general election, where as her party’s nominee, Clinton would have to woo voters who question whether they feel more economically secure after Obama’s eight years in office.

Clinton also rapped Sanders for voting repeatedly with the National Rifle Association while in Congress, welcoming his weekend reversal to support legislation that would deny gun manufacturers legal immunity. She rattled off a list of provisions that she said Sanders had supported in line with the NRA.

Sanders, in turn, said Clinton’s assertions were “very disingenuous” and pointed to his lifetime rating of a D- from the NRA.

The debate over gun control took on a special importance given the event was just blocks from the Emanuel African Methodist Episcopal Church, where nine parishioners were killed during Bible study last summer. Clinton has made the issue a central theme of her campaign, citing it as one of the major differences between the candidates.

The two tangled over financial policy, too, with Sanders suggesting Clinton won’t be tough enough on Wall Street given the big contributions and speaking fees she’s accepted from the nation’s financial firms.

Then, she took a step back to put those differences in a different perspective.

“We’re at least having a vigorous debate about reining in Wall Street,” she said. “The Republicans want to give them more power.”

Both Sanders and Clinton voiced strong support for Obama’s diplomatic overtures to Iran and opposition to sending U.S. ground troops into Syria. Clinton defended her outreach to Russia early in her term as secretary of state, but hesitated when asked to describe her relationship with Vladimir Putin, whose return to the Russian presidency heralded the worsening of U.S.-Russian relations.

“My relationship with him — it’s interesting,” Clinton said to laughs in the debate hall. “It’s one, I think, of respect.” But she added it was critical for the next president to stand up to Putin, describing him as a bully who “will take as much as he possibly can.”

Clinton also shed some light on what role her husband, former President Bill Clinton, would play in her administration. Kitchen table adviser, perhaps?

“It’ll start at the kitchen table — we’ll see where it goes from there,” she said with a laugh.

Then, pointing to the successes of her husband’s administration, she added: “You bet I’m going to ask for his ideas. I’m going to ask for his advice.”

Sanders was asked about his previous criticism of Bill Clinton’s past sexual behavior. He once called the former president’s behavior “deplorable” but said Sunday night that he wants to focus on issues “not Bill Clinton’s personal life.”

Clinton maintained a tight smile throughout that exchange, and nodded as Sanders said he preferred to concentrate on policy matters.

The third participant in the debate, former Maryland Gov. Martin O’Malley, tried persistently to insert himself into the conversation, hoping to boost his poll numbers out of single digits. But it was tough for O’Malley to stand out.

When the conversation shifted to fiscal responsibility, O’Malley said his time in Maryland made him the only person on stage to balance a budget. Sanders — an ex-mayor of Burlington, Vermont — quickly interjected, “I was mayor for 8 years, I did that as well.”