Media playback is unsupported on your device Media caption Trump said there is a "serious problem" with Muslim hatred

Republican presidential hopeful Marco Rubio has attacked Donald Trump for saying that Islam hates America, in a televised debate in Miami.

Mr Rubio, who faces a do-or-die contest in Florida on Tuesday, said Islam had a problem with radicalisation but said that many Muslims were proud Americans.

"Presidents can't just say whatever they want. It has consequences," he said, to cheers from the audience.

The four Republicans heeded pleas from party leaders to have a civil debate.

Unlike in the last TV event, which was littered with personal insults, this one was more substantive with a focus on policy.

"So far, I cannot believe how civil it's been up here," Mr Trump observed at one point.

But on the issue of Islam, there was clear distance between Mr Trump and the others. Mr Trump stood by comments he made earlier in the day when he said "Islam hates us, there's a tremendous hatred", and railed against political correctness.

But Mr Rubio said: "I'm not interested in being politically correct. I'm interested in being correct."

Analysis: Anthony Zurcher, BBC News, Miami

It's now clear that the remaining candidates in the Republican field have run out of ideas on how to stop Donald Trump's march to the Republican nomination.

In early debates the top-tier candidates largely ignored the New York billionaire, hoping he'd self-destruct on his own. In the past few showdowns, they've gone after him relentlessly.

Now, in this 12th event, they started by avoiding confrontation, then prodded him only ever-so-gently.

"I can't believe how civil it's been up here," Mr Trump said at one point.

Given that Mr Trump has a lead in convention delegates and is ahead in many of the states set to vote on Tuesday, a fireworks-free debate is nothing but good news for the front-runner.

While Marco Rubio and Ted Cruz tried to draw contrasts with Mr Trump on issues like foreign policy, trade protectionism and his reliance on anti-Islamic rhetoric, the enthusiasm just isn't there anymore. Mr Cruz, in particular, launched most of his barbs with sighs and head-shaking resignation, rather than ferocity.

This race isn't over yet, but Thursday night's proceedings show that - barring some sort of massive upheaval - the end is likely in sight.

Read Anthony's analysis in full

Obama: 'Don't blame me for Trump'

Who are the Muslims supporting Trump?

All three of Mr Trump's rivals distanced themselves from Mr Trump's statement in December that in the fight against terrorists "you have to take out their families".

"We've never targeted innocent civilians and we're not going to start now" Mr Cruz said.

When Mr Trump was challenged on the legality of targeting civilians, he said that America had to be able to fight on "an equal footing".

"We have to obey the laws, but we have to expand those laws", he said.

On Tuesday five large states will vote for presidential candidate in each party, with Ohio Governor John Kasich and Mr Rubio, a Florida senator, under pressure to win their home states.

Mr Trump picked up a key endorsement of Ben Carson, who last week dropped out of the race before the debate.

Debate highlights:

Mr Trump reaffirmed his opposition to H1-B visa programme, which allows US firms to employ highly skilled foreigners, saying "it's bad for our workers"

Mr Rubio said he would delay retirement until 68 to help address the $150bn social security shortfall

And he accused Mr Trump's numbers of "not adding up" because he said he could save social security by eliminating waste

Mr Cruz said he was going to build a wall, triple the border control and end welfare benefits for undocumented

Mr Trump said he would "make education great" and that former Republican candidate Ben Carson would be involved

And calling Vladimir Putin "strong" did not mean he was endorsing him as a good leader, said Mr Trump

Mr Kasich disagreed with Mr Rubio, who said he did not believe in manmade climate change

The candidates also clashed over President Barack Obama's historic visit to Cuba next week.

Mr Rubio, whose parents were Cuban immigrants, said he was opposed to efforts to restore relations until Cuba improved its human rights record.

But Mr Trump said he was not opposed to a US-Cuba deal, but it should be on better terms for the US.

The other Cuban-American candidate on the stage, Mr Cruz, accused Mr Trump of supporting the Obama-Clinton policy on Cuba.

Media playback is unsupported on your device Media caption Using Hungry Hippos to explain a contested convention

Mr Trump, a billionaire businessman from New York with no political experience, has dominated the news and the state primary contests so far.

On the Democratic side, Vermont Senator Bernie Sanders and former Secretary of State Hillary Clinton are battling for the party's nomination.

Mrs Clinton is leading Mr Sanders in delegate counts so far, though his campaign has proved more formidable than expected.

Both parties will determine their nominees at conventions in July, then Americans will pick their new president in November.

Your browser does not support the iframe HTML tag. Try viewing this in a modern browser like Chrome, Safari, Firefox or Internet Explorer 9 or later.

The next votes

15 March: Florida, Illinois, Missouri, North Carolina, Ohio Primaries

22 March: Arizona Primary, Utah Caucuses, Idaho Caucuses (Democratic)

26 March: Alaska, Hawaii, Washington Caucuses (Democratic)

1 April: North Dakota Caucuses (Republican)

5 April: Wisconsin Primary

9 April: Wyoming Caucuses (Democratic)

19 April: New York Primary