TALLAHASSEE — Republican Sen. Marco Rubio won a second-term Tuesday in a race where he was forced to defend his support for Donald Trump and turn back suggestions he was only seeking re-election to advance his future presidential ambitions.

Rubio defeated U.S. Rep. Patrick Murphy, a two-term congressman with a reputation as a moderate that Democrats hoped would make him successful in a swing state like Florida.

Rubio decided to seek a second term just two days before the deadline to make the ballot and after repeatedly saying he wouldn't seek re-election. Rubio had sought the GOP nomination for president, but dropped out of the race after Donald Trump soundly beat him in the Florida primary.

Still, many speculate the 45-year-old senator will eventually make another presidential run. Rubio's entry into the race nearly cleared a crowded Republican primary and immediately gave Republicans their best shot at holding the seat. Outside groups pumped millions of dollars into the race to help ensure the victory.

Murphy at one point nearly closed the gap in the polls despite national Democrats diverting their money from Florida to Senate races where television ads are less expensive. Republicans attacked Murphy for embellishing his resume by claiming to be a small business owner and a certified public accountant before being elected to Congress in 2012. Murphy was a part owner of an environmental cleanup company, but the business was set up by his wealthy father, and he was a licensed CPA in Colorado, but not in Florida, where he worked at an accounting firm.

Murphy repeatedly criticized Rubio for saying he still supported Trump even after calling the billionaire a dangerous, erratic man who couldn't be trusted with the nuclear codes. Murphy also called Rubio out for missed votes and intelligence briefings while running for president, and questioned whether he would serve his full six-year term.

Rubio wouldn't make that commitment until the candidates' first debate, when he said, "God willing," he will serve the entire term.

Rubio won his seat in 2010, using a tea party wave to come from behind and beat then-Gov. Charlie Crist.