Image copyright AFP/Getty Image caption All three candidates criticised Republican frontrunner Donald Trump

Bernie Sanders has apologised to fellow US Democrat presidential candidate Hillary Clinton after his staff stole valuable voting data from her campaign.

"This is not the type of campaign that we run," he said during a TV debate.

The candidates criticised Republican frontrunner Donald Trump for his call to ban Muslims from entering the US.

But they clashed over Syria, with Mr Sanders accusing Ms Clinton of being set on regime change while she said US leadership was needed.

Former Maryland Governor Martin O'Malley also took part in the debate in Manchester, New Hampshire.

But the former secretary of state remains the frontrunner.

On Syria, she insisted that the US should seek to remove President Bashar al-Assad from power.

"If the US does not lead, there is not another leader - there is a vacuum," she said.

Mr Sanders however argued that the US should first concentrate on defeating so-called Islamic State (IS).

"Getting rid of dictators is easy, but you have to think about what happens the day after," he said.

Image caption Clinton and Sanders got about the same number of Twitter mentions during the debate

Both the main speakers had strong words for Mr Trump, with Ms Clinton calling him "the biggest recruiter for IS" and saying he used "bigotry and bluster to inflame people".

The debate was the first for Democrats since 14 people were killed in San Bernardino in California by a married couple that the authorities say had been radicalised.

All three candidates said it was important to work more closely with Muslim-American communities to tackle radicalism at home.

Watching the debate: BBC's Laura Bicker

After the bickering build-up - there was an apology. On stage these candidates want to reserve their fire for the Republicans. They don't want a damaging campaign. That's why they turned their attention to the Republican frontrunner Donald Trump. They want to highlight the division amongst their rivals and present themselves as the adults serious about policy.

But there are differences amongst the candidates when it comes to the future of Syria and how to deal with the threat of the so-called Islamic State.

In truth, all three candidates put in a strong performance. But Hillary Clinton did everything she needed to do to stay ahead. She even managed a few human touches. When asked if Wall Street would love her, she quickly retorted: "Everyone should."

She also managed to get the most retweeted quote of the night as she ended by telling voters: "May the Force be with you."

The key question for the party is - was anyone paying attention? The Democrats have been accused of scheduling the debates at a time when few people are watching. This was no exception - a political debate at prime time on a Saturday night just a few days before Christmas.

Data access

Bernie Sanders admitted that on two occasions his campaign could see proprietary data from Hillary Clinton's campaign following computer breaches - which he said were the fault of the software vendor.

He said that the most recent breach involved inappropriate behaviour by one of his staff members, adding that person had now been dismissed.

He said that the Democratic Party's decision to temporarily suspend his campaign's access to the strategically crucial database was "an egregious act".

Image copyright Reuters Image caption Bernie Sanders apologised to Hilary Clinton early in Saturday evening's debate

The Sanders campaign on Friday filed a lawsuit against the Democratic National Committee in a federal court to restore its access to the voter data.

Strategically important information on voters is contained in the database, which campaigns use to decide strategy.

That data takes on a crucial role as campaigns prepare for early primary voting in just over a month's time.