Sen. Marco Rubio (R-Fla.) revived his political career on Tuesday, edging out Rep. Patrick Murphy (D-Fla.) to keep his seat in the U.S. Senate.

Polling had suggested a narrow but consistent lead for Rubio going into Election Day, and the ultimate vote tallies gave Rubio a comfortable margin of victory in the hotly contested swing state.

Aside from the presidential race, it’s possible no electoral contest in 2016 was uglier or dumber than the Florida Senate campaign. Rubio initially said he didn’t even want the job, pledging to retire from electoral politics if he did not win the presidency. But his presidential run proved a debacle in which Rubio was reduced to suggestively mocking the size of Donald Trump’s hands in an effort to salvage his poll numbers.

Rubio withdrew from the Republican primary in March, after winning only one state ― Minnesota ― and getting blown out by Trump in Florida. Rubio reconsidered his Senate ambitions in June, after discussions with Senate Majority Leader Mitch McConnell (R-Ky.) and others, and announced his newfound intent to hold on to his Senate seat.

A September survey from Public Policy Polling gave Rubio just a 35 percent job approval rating, while 45 percent of voters said they disapproved of him. But he faced a remarkably weak challenger in Murphy, a former Mitt Romney donor who entered politics as a Democrat in 2012 to successfully challenge then-Rep. Allen West (R-Fla.).

Murphy’s time in office has been marred by his support for unwinding consumer protections in the mortgage market, deregulating large regional banks, undermining new rules to rein in payday lenders and helping car dealers overcharge customers of color.

Murphy’s viability as a candidate has largely depended on the largesse of his father, a wealthy Florida construction magnate who has contributed over $1 million to super PACs supporting his son and over $180,000 to his son’s official campaign coffers, according to the Miami Herald. Murphy’s path to the Democratic nomination was eased by the public meltdown of his chief primary challenger, Rep. Alan Grayson (D-Fla.), amid a messy divorce in which Grayson’s ex-wife accused him of abuse and Grayson accused her of bigamy. A congressional ethics investigation into Grayson’s offshore hedge fund also cast a shadow over the primary.

With Rubio on the sidelines for much of the year, Murphy was widely considered the favorite to win the Senate race. When Rubio declared his candidacy, though, he leapt ahead of Murphy in the polls, a lead that he maintained for months. Murphy attacked Rubio’s absenteeism in Congress ― Rubio has missed a higher percentage of votes than any other senator since taking office in 2011― and attempted to tie Rubio to Trump. Rubio acknowledged that Trump was a “horrifying choice” during an October debate with Murphy, but stood by his endorsement of the GOP presidential nominee.

Murphy gave up his House seat to focus on the Senate campaign.