Sen. Marco Rubio (R-Fla.) speaks at the Republican Party of Palm Beach County’s 15th annual Lobsterfest on Aug. 18 in Boca Raton, Fla. (Wilfredo Lee/Associated Press)

In a banquet hall brimming with Republicans preparing to don bibs and tuck into lobsters, Marco Rubio appealed for a second term in the U.S. Senate much like he tried — and failed — to become the party’s presidential nominee.

He called the election a “generational choice.” He oozed optimism about the United States’ status as “the greatest country in the world.” He jokingly compared his first job in office to being on a condominium board without any power. On the tables were signs bearing his distinctive lowercase logo, with an outline of Florida dotting the “i” in his name where the continental United States used to be.

Marco Rubio’s Senate campaign logo, as seen in this composite image, is the same as his presidential logo — but the dot above the “i” is Florida rather than the United States. (Left: Alex Holt for The Washington Post; Right: Sean Sullivan/The Washington Post)

His uplifting themes were badly out of step with an irascible Republican base that chose Donald Trump as its presidential nominee. But Rubio is wagering that they will fare better as part of his reelection bid in a state that could go either way in November.

“I do think they can resonate,” Rubio said in a brief interview. “But more importantly, it’s who I am, it’s why I’m in public service. So I’m going to continue to talk about the things that I believe in.”

Many others have concluded that there is an additional consideration: Rubio never stopped running for president and has his sights set on carrying his ideas into 2020 or beyond. Either way, a whole lot is at stake for the 45-year-old senator.

A win would serve notice to the GOP that he holds a formula for success in a battleground state, thrusting him back into the center of the fight to shape the future of the party. A loss would be the second in his home state in less than a year — and would devastate if not end his political career.

The first hurdle Rubio must clear will come in the Aug. 30 primary, when he is favored to defeat businessman Carlos Beruff, who is running on a Trump-like platform but without the nominee’s support. Rubio is largely zeroing in on Rep. Patrick Murphy, the Democratic front-runner who is trying to get past Rep. Alan Grayson.

Although Rubio’s core pitch to voters is largely the same as it was during the presidential campaign, his circumstances have changed. He has identified a new villain in Sen. Charles E. Schumer (N.Y.), who is in line to be the next Democratic leader. Instead of courting Iowans in Oskaloosa, he is talking about local issues such as algae bloom from Lake Okeechobee discharges. He is no longer the youthful upstart — Murphy is 33 — or a non-incumbent.

He also is carrying baggage from his disappointing White House run. Even supporters concede that his oft-stated frustrations with the Senate, his many missed votes and his repeated promises not to seek reelection complicate his pitch. So do the accusations by his rivals that he is an overly ambitious and scripted politician with a thin record of accomplishments.

“Initially he said he’s out,” said Gabriel Motz, 56, of South Florida, an early Trump supporter who backs Rubio for reelection and thinks the senator wants to run for president again. With a chuckle, Motz ventured a guess about why Rubio reversed course: “I guess once he realized he’s got to go get a job, maybe?”

As it was in the presidential primary, Rubio’s fate will be tied to Trump. Republicans think the senator’s crossover appeal will help him run ahead of the White House hopeful, who has fallen behind in Florida. But a landslide by Democratic nominee Hillary Clinton could wipe him out.

Plates of lobster are shown during the Republican Party of Palm Beach County's 15th annual Lobsterfest on Aug. 18 in Boca Raton, Fla. (Wilfredo Lee/Associated Press)

Place settings at the Republican Party of Palm Beach County's 15th annual Lobsterfest on Aug. 18. (Wilfredo Lee/Associated Press)

Speaking at Lobsterfest, a Palm Beach County GOP fundraising dinner where he gave the keynote address Thursday night, Rubio framed his candidacy as one with national implications and said he is a critical bulwark against a Democratic Senate majority.

“If we lose the Florida Senate race, we put the balance of power in danger in the U.S. Senate,” he said. “And even if we win the presidency, you won’t be able to get anything done because Chuck Schumer is blocking it. We cannot lose the Senate. And we cannot lose Florida.”

Rubio highlighted many of the broad thoughts he touched on when he ran for president: The country should champion vocational job training, and it should “re-embrace” free enterprise, the Constitution and the notion that a powerful U.S. military power is good for the rest of the world. He reached the same aspirational conclusion he often reached on the trail in Iowa, New Hampshire and elsewhere.

“I’m telling you that if we return to these principles and apply them to the unique challenges of the 21st century, our children and grandchildren will grow up to be the freest and most prosperous Americans that have ever lived,” Rubio said. “And if we fail, then we will be members of the first generation in the extraordinary history of America — the first generation — that left their kids worse off than themselves.”

Those lines were met with a shrug in the presidential primary. Rubio won only three contests — in Minnesota, Puerto Rico and the District. He was trounced by Trump in Florida and ended his campaign after that painful defeat.

“As many of you know, I ran for president earlier this year,” Rubio told the crowd in Boca Raton, which barely reacted at first. “And, uh, yes, you may have seen it on TV,” he added, drawing a hearty, if delayed, round of applause.

He underscored the Supreme Court vacancy opened by the death of Justice Antonin Scalia in his argument for a Republican Senate majority and for supporting Trump. Like many other Republicans in swing states, Rubio is trying to walk a fine line with the presidential nominee.

When Rubio announced in June that he would run for reelection, he reversed his long-standing promise not to try to return to the Senate in 2017. At an event this month, he said that he didn’t want to “freeze” the GOP field in such a critical Senate race as he ran for president.

Rubio has said that concerns about a Clinton or a Trump presidency motivated him to come back and try to serve as a check against either one, as did concerns that Democrats would win his seat. But he supports Trump, and Trump supports him.

Murphy’s campaign recently released an online video spotlighting Rubio’s intense criticism of Trump during the presidential primary — he called him a “con artist” — alongside their current mutual endorsements. The video concludes that Rubio is “not strong enough to stand up for us.”

As a White House contender, Rubio told voters that only a new president could bring about significant change. As he once put it: “We’re not going to fix America with senators and congressmen.”

He also missed many votes. For a time, he was the most frequently absent member of the Senate, one study found. Beruff’s campaign cast Rubio as an absentee senator in a recent TV ad.

Some Republicans worry that this will all come back to haunt Rubio in the fall, even if only marginally.

“I think it will cost him a little bit but I don’t think it will cost him the election,” said Steven Ledewitz, 71, president of the Republican Club of Central Palm Beach County.

Sharon Greenhouse, a Rubio supporter from Boca Raton, was more forgiving.

“I think things change in politics. And that’s how he sees it,” she said.

A recent Monmouth University poll showed that more than half of Florida voters said Rubio was running for reelection more to improve his chances for a future presidential run than to serve the public. Only a quarter said he was doing it more to serve the public.

Sen. Marco Rubio, right, smiles as he leaves the Republican Party of Palm Beach County's 15th annual Lobsterfest on Aug. 18. (Wilfredo Lee/Associated Press)

Rubio has come out swinging against Murphy. He labeled him one of the most “unaccomplished” and “ineffective” members of Congress. He also has negatively highlighted Murphy’s family wealth and the infusion of cash he has received to help his political career.

“How can someone run for office claiming to be the champion of the little people when not a single day of your life have you ever had to worry about where your next paycheck is going to come from?” Rubio asked in Boca Raton.

As he makes the case for another term, Rubio has spent more time highlighting local issues. The morning after his speech, he visited the Space Coast for a roundtable discussion with industry figures arranged through his Senate office. He also has been an outspoken advocate of funding to fight the Zika virus.

With Trump struggling to gain traction nationwide and stoking new controversies each week, there are conversations in the GOP about what the party ought to stand for if the presidential nominee loses. If Rubio can win in Florida — even if Trump cannot — it will give his message new life after many left him for dead.

But a defeat, supporters fear, would be lethal to Rubio’s political future.

“If he loses, then it’s probably the writing on the wall,” said Dan Hodgeman, 53, of Boca Raton.