U.S. Republican presidential front-runner Donald Trump came under fire from his rivals on Thursday for saying Muslims hate the United States at a debate where the gut-punching attacks of earlier forums gave way to a suddenly civil tone with a serious focus on the issues.

Trump, who has voiced skepticism about U.S. military involvement abroad in the past, for the first time said America's effort against Islamic State militants might require between 20,000 and 30,000 U.S. troops, a number similar to what some Republican hawks have proposed.

The CNN-hosted debate at the University of Miami was crucial, coming days before votes in Florida and Ohio that will determine whether U.S. Senator Marco Rubio of Florida and Ohio Governor John Kasich will be able to continue with their increasingly long-shot candidacies.

Trump, for his part, used the debate to try to attract establishment Republicans, saying he is generating support from non-Republicans who could help carry the party to victory in the Nov. 8 election. And he eschewed the inflammatory, personal attacks on his rivals that have drawn both cheers and boos in prior debates.

USA-ELECTION/

Republican U.S. presidential candidate Donald Trump was less bombastic at Thursday's debate as he heads into a primary night next week that could cement his status as the party's nominee. (REUTERS)

"The Republican Party has a great chance to embrace millions of people that it's never known before. They are coming by the millions. We should seize that opportunity," he said.

But he stuck to positions that many establishment Republicans reject, such as his belief, as stated in television "We have a serious problem of hate. There is tremendous hate," said Trump, who has proposed a temporary ban on Muslims entering the United States.

Rubio, Cruz and Kasich said the United States needs to maintain good relations with Muslim countries in the Middle East to help in the fight against Islamic State militants. "

We are going to have to work with people in the Muslim faith even as Islam faces a serious crisis within it," Rubio said.

Rubio also defended American Muslims as patriots.

"If you go anywhere in the world you're going see American men and women serving us in uniform that are Muslims," he said.

"Anyone out there that has the uniform of the United States on and is willing to die for this country is someone that loves America," he added.

GOP 2016 Debate

Republican presidential candidate, Sen. Marco Rubio, R-Fla., pushed back against Trump's comments about Muslim hate. (Wilfredo Lee/The Associated Press)

Rubio shifted to a more positive tone after his anti-Trump tirades of the past two weeks. But he and Cruz repeatedly sought to raise questions about Trump's policy positions from trade to the Middle East.

Cruz pointed to areas where Trump has been a late-comer to the conservative movement, such as his past support for Democratic causes and candidates. He also noted how Trump has asked his supporters at rallies to demonstrate support by raising their right hand, a scene that produced photographs that some critics said looked like Nazi Germany.

"At Donald's rallies recently he's taken to asking people in the crowd to pledge their support to him. I have to say I think that's exactly backwards. We are here pledging our support to you, not the other way around," Cruz said.

Trump, in discussing how he would consider placing between 20,000 to 30,000 U.S. troops on the ground to defeat Islamic State militants, vowed to complete the mission quickly and bring troops home to focus on rebuilding the United States.

"We really have no choice, we have to knock out ISIS," Trump said. "I would listen to the generals, but I'm hearing numbers of 20,000 to 30,000."

It was the most detailed view yet of Trump's thinking about Islamic State. He has previously talked of "knocking the hell" out of ISIS without offering specifics.

Winner-take-all-states loom

Next Tuesday's Florida and Ohio Republican primaries both award delegates on a winner-take-all basis, meaning that the winner of the popular vote is awarded the state's entire slate of delegates.

So far, 25 states and Puerto Rico have held nominating contests, and Trump has amassed a solid lead in the delegate race. According to the Associated Press, Trump has 458 delegates, followed by Cruz at 359, Rubio at 151, and Kasich at 54. Clinching the Republican nomination requires 1,237 delegates.

There are a total of 367 delegates at stake on Tuesday, including a total of 165 in Florida and Ohio.

Trump on Thursday appeared to try to seem more presidential, something he has pledged often in the past to do, but never has. On Thursday he modulated both the tone of his voice and the tenor of his remarks, which in prior debates have drawn sharp criticism for being vulgar.

"I would say this, we're all in this together. We're going to come up with solutions, we're going to find the answers to things, and so far I can't believe how civil it has been up here," Trump said.

The two-hour debate included a sober discussion of pressing foreign and domestic policy challenges, including illegal immigration, reform of Social Security, free trade deals, the role of the federal government in education and Israel.

USA-ELECTION/

Republican presidential candidate Ted Cruz, right, criticized Donald Trump's plan to bring more manufacturing to the U.S., which involves a tariff on foreign goods. (Carlo Allegri/Reuters)

Trump insisted he would impose a tariff, as high as 45 percent, on some imports from countries like China.

Trump said his goal is to encourage production of goods on American soil.

"People will buy products from here," Trump said. "We'll build our factories here and we'll make our own products."

Trump asked about violence at his rallies

But Cruz, looking to emerge as Trump's central challenger and consolidate the party's anti-Trump vote, said the New York billionaire's tariff plan would only lead to higher prices for American consumers because companies from the exporting country would increase prices.

"A tariff is a tax on you, the American people," Cruz said.

Trump said he would pause for a year or two the H1B federal visa program to reduce an influx of foreign workers into the United States.

He acknowledged he has taken advantage of that visa program in order to bring in foreign workers to work at some of his own resort properties. He said he would also pause the issuance of Green Cards, which grant permanent residency, for these workers.

Kasich emphasized the need to control the U.S. southern border with Mexico to stem illegal immigration. He said he would offer a path to legal status, but not citizenship to the more than 11 million illegal immigrants in the country.

"We can't just have people walking in," Kasich said.

GOP 2016 Debate

Republican presidential candidate, Ohio Gov. John Kasich, speaks during the debate sponsored by CNN, Salem Media Group and the Washington Times at the University of Miami. (Wilfredo Lee/The Associated Press)

At the debate Trump was questioned about whether he had set a tone at his rallies that fuelled violent encounters between supporters and protesters, the latest incident coming Thursday when a white man was arrested for sucker-punching a black man at a rally.

"I truly hope not," he said, but added that many of his supporters have "anger that is unbelievable" about how the country is being run and that some of protesters were "bad dudes."

President Barack Obama, offering political commentary from the sidelines, said earlier in the day the party was going through a "Republican crackup" that had taken on the tone of a "circus." He blamed the GOP itself for fostering the idea "that cooperation or compromise somehow is a betrayal."