US Democrats spar on gun control
Candidates for the Democratic race for the White House have clashed on gun control and healthcare in their liveliest TV debate so far.
Hillary Clinton attacked Bernie Sanders' record on gun control, and said his healthcare plan risked derailing recent legislation.
Sanders accused Clinton of being in the pocket of financial institutions responsible for the 2008 crisis.
While Clinton leads nationwide, Sanders is a threat in key states.
Hours before the debate in South Carolina, Sanders - a Vermont senator - had unveiled a healthcare plan for all American citizens.
This was the final Democratic debate before caucuses in Iowa on 1 February show who the state's voters prefer as their candidate.
Former Maryland Governor Martin O'Malley, who is trailing Clinton and Sanders in polls, also took part in the lively debate in which personal attacks were few and far between.
Sanders announced his universal healthcare plan two hours before the debate started.
--It would see citizens pay what he called "a 2.2% income-based premium" towards healthcare
--Companies would pay an extra 6.2% of an employee's income towards the plan
--Sanders' campaign website said it was a way to "stop forcing working Americans to choose between bargaining for higher wages or better health insurance".
Clinton said any moves to scrap the current Affordable Healthcare Act risked plunging the Democrats into "contentious debate". Instead, the party should work on improving the programme, known as Obamacare.
Sanders responded: "Nobody is tearing this up." He said he wanted to build on Obamacare.
Analysis - Kim Ghattas, BBC News, Charleston
This was a spirited, substantive debate, much more heated than the last three Democratic debates but still more civil than anything we've seen on the Republican side.
Bernie Sanders was on the offensive, buoyed by his recent gains in the polls in Iowa and New Hampshire. Hillary Clinton still has a double-digit lead nationally and was declared the winner of the debate by the American media.
O'Malley was nowhere to be seen, but Clinton and Sanders worked hard to sharpen the differences between them, particularly on gun control and healthcare.
The Vermont senator is gaining momentum in the north but is struggling to connect with the African-American community and minorities.
Gun control was the first subject in the two-hour debate, that was held near a church in Charleston where nine parishioners were shot dead in June 2015.
Clinton released an advertisement this week attacking Sanders for his attitude towards gun control. His home state, Vermont, has one of the highest rates of gun ownership in the US, with close to one in two households owning a weapon.
In the debate, she again highlighted legislation she said showed that Sanders supported the gun lobby.
But Sanders told the debate he had a "D minus voting record" from the National Rifle Association, and fully supported moves by President Obama for tougher background checks on gun buyers.
O'Malley pointed out restrictions he passed against combat assault weapons in Maryland, adding: "I have never met a self-respecting deer hunter who needed an AR-15 [semi-automatic rifle] to down a deer."
Other subjects discussed included:
Foreign policy: The two leading candidates voiced their support for President Obama's opposition to sending ground troops to Syria and to the warming of diplomatic ties with Iran
Michigan water crisis: Clinton said "every single American should be outraged" over the contamination of water in Flint, Michigan; Sanders said Governor Rick Snyder should resign
Banks: Sanders said he found it "very strange" a bank could escape prosecution for criminal activity, "while kids who smoke marijuana get a jail sentence". He also accused Clinton of taking $600,000 in speaking fees from Goldman Sachs; Clinton attacked him for his criticism of President Obama's donations from financial institutions
Polls indicate Clinton and Sanders are neck-and-neck ahead of the caucus in Iowa, where voters will decide who they want as their preferred candidate. She had once commanded a large lead.
In New Hampshire, Sanders holds a lead in polls ahead of voting in the primary there eight days later.