The legend of New Jersey Gov. Chris Christie in national Republican politics was forged at the Jersey Shore, where he shrewdly spun headlines that were cotton candy for the GOP’s base — and for reporters.

“Get the hell off the beach!” Christie barked in 2011, as Hurricane Irene fast approached the coast. A year later, while holding an ice cream cone, he clashed with a heckler on the Seaside Heights boardwalk in the wake of enacting conservative fiscal policies that thrilled activists and donors.

But those electric days now seem like ancient times to longtime Christie observers. His prominent profile has all but drifted away following years of defeats and humiliations — punctuated this week by aerial images of him sitting on an isolated strip of sand, run on a cable-news loop.

Sporting floppy sandals and a baseball cap, Christie unapologetically lounged in the sun with his family at a state-owned beach house amid a statewide government shutdown that closed such beaches to the public. The scene — captured in airplane photographs snapped by the state’s largest newspaper, the Newark Star-Ledger — again revealed the indifferent defiance that has both lifted and hobbled Christie’s political career.

That attitude thrust him into stardom and then out — and into President Trump’s inner circle and then to its edge.

In November, President-elect Donald Trump greets New Jersey Gov. Chris Christie at the clubhouse at Trump National Golf Club Bedminster in Bedminster Township, N.J. (Jabin Botsford/The Washington Post)

For those who know Christie — who is the most unpopular governor in the country, according to polls — the pictures of him among the dunes at Island Beach State Park were a reflection of who he has always been: a flawed brawler who relishes the limelight and who deliberately ignores decorum.

“It tells me nothing that I haven’t known for a very long time. He’s petulant, a bully, and his nature is to fight, fight, fight,” New Jersey state Sen. Richard J. Codey, a Democrat who served as acting governor from 2004 to 2006, said in an interview Monday. “I get along with every former governor, but not with him.”

[How Chris Christie got to enjoy a closed public beach while his state is in a shutdown]

Former Republican National Committee chairman Michael Steele said Christie was “Trump before Trump.”

“From the moment I met him in our first meeting in 2009, to Monday’s press conference, he has been someone who is in­cred­ibly comfortable in his skin. He does what he wants to do, and his success can be traced to that,” Steele said. “But there are consequences, of course, when you work that way.”

Similar stories of his swagger are legion. Christie used to take a 55-foot-long State Police helicopter to his son’s baseball games. He was asked to give the keynote address at the 2012 Republican National Convention but uttered only a few words about the party’s standard-bearer, Mitt Romney. Christie’s taste for luxury travel has been funded by foreign leaders and a casino magnate. And his time in the owner’s box cheering on his beloved Dallas Cowboys sparked a flurry of ethics questions.

Yet Christie has not been humbled by his waning support or inclined to keep a lower profile as he serves out his final months. Instead, he has been as dismissive and as unflinching as ever.

1 of 9 Full Screen Autoplay Close Skip Ad × Gov. Chris Christie caught sunbathing at beach closed to public because of government shutdown View Photos The New Jersey governor was captured in pictures enjoying the beach with family and friends, despite the fact that it’s closed to everyone else. Caption The New Jersey governor was captured in pictures enjoying the beach with family and friends, despite the fact that it’s closed to everyone else. July 3, 2017 A sign in Seaside Park, N.J., alerts motorists that Island Beach State Park is closed because of a state government shutdown. Mark Makela/Reuters Buy Photo Wait 1 second to continue.

“The 15 percent approval rating has gotten to him, to the point that he’s giving a giant middle finger to the people of New Jersey by sitting on that beach,” Bob Ingle, a Christie biographer, said in reference to recent polling. “He is so stubborn, so thin-skinned and blames everyone but himself for what has happened.”

Even New Jersey Lt. Gov. Kim Guadagno, his deputy since 2010 and the GOP’s nominee to succeed him, has criticized Christie for his sojourn on state land during a budget impasse in Trenton, which ended late Monday after Christie struck a deal with Democrats.

“It’s beyond words. If I were governor, I sure wouldn’t be sitting on the beach if taxpayers didn’t have access to state beaches,” Guadagno said in a statement.

Christie, in his typical style, has swatted away the controversy. “That’s the way it goes,” he said Saturday when asked about his stay. “Run for governor, and you can have the residence.”

[The Fix: The Greek tragedy that is Christie’s political career just hit a new low]

Uproar over the photos — dubbed “Beachgate” online — swelled Monday as some of the state’s “nonessential services” remained shuttered. Among those affected were a Cub Scout group forced to leave a state park campsite and drivers unable to obtain documents from the state Motor Vehicle Commission, the Associated Press reported.

On Monday, Christie tweeted his own photo from above the Jersey Shore, noting that “beaches are open in 119 of our . . . 130 miles of coastline” — the implication being that residents had alternatives to the closed stretch of beach that Christie and his family had occupied by themselves. The tweet spurred another round of shaming on social media.

Christie’s spokesman, meanwhile, punched back at the Star-Ledger. “The governor announced Monday on ‘Ask the Governor’ and at subsequent news conferences that he would be joining his family at the beach this weekend,” Brian Murray told The Washington Post. “We are gratified the Star-Ledger has confirmed what he said on three occasions.”

In an interview with a New York-based Fox affiliate, Christie also mocked the paper. “I am sure they will get a Pulitzer for this one,” he said.

The insouciant remarks were the latest in a string. When asked late last month about the recent Quinnipiac University poll that showed him with 15 percent support, Christie shrugged.

“That fact is, who cares?” Christie told reporters. “You guys care much more about that stuff than I do. I’ve said to you over and over and over again: Poll numbers matter when you’re running for something. When you’re not running for something, they don’t matter a bit, and I don’t care.”

Christie rose to prominence nearly a decade ago because he embodied the combative ethos that many GOP voters found ­lacking in the party’s national leadership. He tangled with ­public-sector unions in a deep-blue state, so much so that his town halls became YouTube sensations. When he ran for reelection in 2013, he won a crushing 60.4 percent of the vote.

But weeks after that victory, scandal erupted. A handful of his aides were implicated, and later given prison sentences, for orchestrating traffic jams on lanes leading to the George Washington Bridge as part of an effort to punish a small-city Democratic mayor.

Christie still mounted a bid for the presidency ahead of 2016, and there were flashes of the Christie of old, especially when he took on Sen. Marco Rubio (R-Fla.) in a debate with the brutal flair he had mastered as a federal prosecutor. But his ambitions had been badly damaged by the bridge incident, and he dropped out after the New Hampshire primary.

His struggles at home have only grown. Driven by his pledge to get the state’s biggest health insurers to fund programs for opioid addiction — which has become a core cause for him — Christie attempted to pressure state lawmakers to work with him on the issue. They refused, and the government shut down for three days.

“With Christie, the tragedy is that he’s always had to work with a left-wing, Democratic legislature. Except for the first year, when he had shock value as a new governor, he hasn’t been able to get things through,” said Larry Kudlow, a CNBC commentator who advised Trump’s presidential campaign. “He has not been able to implement his promises and his hopes for growth.”

[Pence replaces Christie as leader of Trump transition effort]

Christie’s experience with Trump has also been defined by fits and starts. They bonded after Christie endorsed Trump last year, but the governor found himself ridiculed in March 2016 when he grimly stood behind Trump at an event. The pictures from that episode went as viral as those from the beach.

“No, I wasn’t being held hostage. No, I wasn’t sitting up there thinking, ‘Oh, my God, what have I done?’ ” Christie later said.

Then, in May of last year, Trump poked fun at Christie’s appetite. At a rally, he asked Christie, “You’re not eating Oreos anymore, are you?”

“No more Oreos for either of us, Chris. Don’t feel bad,” Trump said.

The indignities went on throughout the summer. Christie was in play to be Trump’s running mate and at one point thought he had all but clinched it, according to several people close to the campaign. But Trump ended up tapping then-Indiana Gov. Mike Pence.

During debate prep sessions, Trump veered between enjoying Christie’s company and being annoyed by what Trump saw as an eagerness to be seen as an influential campaign adviser, according to two people involved in the sessions who were not authorized to discuss them.

Soon after Trump won, Christie — who had been managing the transition team — was unceremoniously let go, and the son of a man Christie previously prosecuted — Trump’s son-in-law, Jared Kushner — largely took over.

Ever since, Christie has occasionally visited the White House and remained friendly with Trump, who has appointed him to lead a task force on opioid addiction.

At one meal together, Trump ordered for Christie. ‘‘This is what it’s like to be with Trump,’’ Christie told a radio show. ‘‘He says, ‘There’s the menu, you guys order whatever you want.’ And then he says, ‘Chris, you and I are going to have the meatloaf.’ ’’

Steele said that regardless of Christie’s stumbles, he retains stature in parts of the Republican Party as a survivor.

“I know people want to write his political epitaph, people want him to go away,” Steele said. “But this is someone who doesn’t go away. When they say ‘damaged goods,’ it doesn’t matter to him. A Senate run, a presidential run, an administration job — anything like that — could be what’s next.”

Amy B Wang contributed to this report.