Florida Senator Marco Rubio has suspended his campaign for president of the United States, after losing his home state to the Republican front-runner Donald Trump.

"While this may not have been the year for a hopeful and optimistic message about our future, I still remain hopeful and optimistic about America," he told supporters at a rally in Miami.

Rubio spoke over boos from the audience as he congratulated Trump. The Florida senator sought to calm his supporters, and took a heckler in stride, saying the person would "not get beat up" at his rally, a swipe at the recent disturbances at some of Trump's rallies.

He said that he would offer "a prayer" for the eventual Republican nominee, but did not suggest it would be Trump, who has a significant delegate lead over Ted Cruz and John Kasich. He has waffled of late as to whether he would support Trump if the celebrity businessman became the Republican standard-bearer.

Rubio also bemoaned the current political climate in which people "literally hate each other" because they differ politically.

GOP 2016 Rubio

Republican presidential candidate Marco Rubio speaks during a rally at Florida International University in Miami on Tuesday. Rubio is ending his campaign for the Republican nomination for president after a humiliating loss in his home state of Florida. (Paul Sancya/Associated Press)

The decision also came after poor performances last week in Michigan and Mississippi, where he attracted only single-digit support in the polls.

Former Republican favourite in 2016 race

Rubio entered Tuesday's presidential primaries with 163 delegates, trailing behind Trump's 469 and Ted Cruz's 370. The winning candidate will need 1,237 to clinch his party's nomination.

Only six years earlier, he was a Tea Party favourite who crushed the Republican Party's "establishment" candidate to win a seat in the U.S. Senate.

But the political tables turned on the Florida senator as a 2016 presidential candidate who was lambasted as mainstream in a year when voters cried out for an outsider.

Follow our live blog of tonight's primaries here.

USA-ELECTION/RUBIO

Rubio entered Tuesday's presidential primaries with 163 delegates, trailing behind Trump's 469 and Ted Cruz's 370. (Carlo Allegri/Reuters)

with files from Reuters and CBC News