First there was the Alvin Gentry charm offensive.

Then came the Dell Demps financial offensive.

Or, since it’s his money, maybe that should be Tom Benson financial offensive.

And they both worked. Big-time.

June hadn’t turned into July before Anthony Davis had accepted the Pelicans’ five-year max contract offer worth upwards of $145 million. The exact total is tied to the salary cap, of which Davis can receive up to 30 percent of the team’s total starting in 2016.

Whatever the final figure is, it will far exceed the five-year, $100 million deal Drew Brees received from Benson’s football side of the ledger in 2012, making Davis the highest-paid athlete in New Orleans sports history and eventually the best-paid in the NBA.

Brees had won a Super Bowl when he was rewarded. Davis is being counted on to do great things in the future.

Plus, for Davis, it’s all guaranteed.

Not bad.

Not bad for the Pels, who have secured the services of the person Gentry called “the best player in the NBA not named LeBron James” on the day the coach was introduced (we told you AG was on a charm offensive). The Pelicans now have Davis for the prime of his career.

As this year’s Finals proved, one superstar can’t win it all. But it puts you in the running.

That makes it well worth it for Mr. B.

And it’s also the right move for Mr. AD.

While early indications were Davis and his handlers were inclined to either pass on the offer for now or seek a shorter one, Demps (who is now the early front-runner for NBA Executive of the Year) along with Gentry convinced him to take the big bucks now — which are more than any other team can offer until 2017 — because big things are on the horizon for the Pelicans.

That Davis accepted the deal as soon as he could was somewhat surprising. He had until Oct. 31.

But the notion that Davis sees a long-term future with the Pels is no surprise to ESPN analyst Amin Elhassen, who spent six years with Gentry and the Phoenix Suns.

“Everything is looking up in New Orleans,” Elhassen said. “The team made the playoffs and now has brought in a very highly respected coach.

“Even though Davis was the No. 1 overall pick, he hasn’t made that much money (about $25 million). So that wasn’t not enough for him to take that kind on gamble on his first contract.”

Of course, money can’t buy happiness, which for Davis would be reaching his goal of becoming the best player on the planet — not just the best player not named LeBron — and winning a fistful of titles.

And that’s where Gentry’s charm offensive came in.

His big pitch in his first interview with Demps was a PowerPoint presentation on how he could improve Davis’ already impressive talent portfolio (Corner 3s, anyone?) within Gentry’s quickened offensive pace. Gentry also retained assistant Kevin Hanson, Davis’ shooting whisperer.

“Every guy in this league wants to be coached,” Gentry said last week. “AD will know that even if I have to get on him, it will be to get him better.”

Additionally, Gentry has pledged a big boost in the team’s defensive efficiency, starting with the hiring off well-regarded Darren Erman to handle that side of things.

“That’s a big hire,” Elhassen said. “Darren is highly respected around the league because of what he’s done at Boston and Golden State.

“And you can be sure that with Al’s teams, everyone’s voice is heard. It’s just like what Steve Kerr did at Golden State — bring in top guys and always respect their input.”

Of course, that doesn’t mean Gentry’s post-championship locker-room pitch to Davis — “AD,” he said, “we’re coming right back here” — is coming true, especially not next season.

Thanks to salary cap restraints, Demps is pretty much having to stand pat with the team that Monty Williams finished with, hence Gentry’s unsurprising declaration that he likes the roster he has.

“Monty left a culture of competitive basketball,” Gentry said, making sure to compliment his predecessor with whom Davis had a close relationship. “They showed mental and physical toughness and they never quit.

“So the culture is here for us to expand on the things that can take us to a championship.”

Keeping personnel changes to a minimum apparently includes re-signing center Omer Asik. Team officials feel he’s much more like the guy whose improved play in the down the stretch helped the Pels secure a playoff berth than the one who was embarrassingly bad against the Warriors, where Gentry had a front-row seat to form his own opinions.

A mid-level exemption free agent could help at small forward, but no big impact additions are expected.

Of course, neither was Wednesday night’s signing.

The most realistic hope is to stay healthy and pretty much tread water — meaning making the playoffs again — until 2016 when Eric Gordon and Ryan Anderson, among others, come off the books and the team can go after high-level free agents who want to play with Anthony Davis.

And even if the Pels make the playoffs, the Western Conference isn’t getting any easier. Just check out what the rest of the Southwest Division is doing to either keep their best players (Memphis and Marc Gasol) or adding more All-Stars (San Antonio and LaMarcus Aldridge).

But at least the Pelicans are considered a team on the rise — witness Las Vegas putting their title odds even with Atlanta and Houston, teams that won 60 and 56 games respectively last season. And that was before the Davis agreement.

That’s a lot better than the locals wallowing in obscurity after their last big star, Chris Paul, managed to force his way out of town.

Be assured that Davis, who had kept a low profile since the season’s end before tweeting out the big news Wednesday night, had taken note of all of that.

He doesn’t want to wait until he’s 10 years into his career, like Aldridge, before having to make a move to enhance his hopes of winning a title.

That’s why Gentry went all out convincing Davis that New Orleans is the best place for him to spend the rest of the decade.

And it’s why Demps’ plan of surrounding Davis with young but proven veteran talent instead of building through the draft will continue.

And it’s why Tom Benson’s wallet is a little lighter now.

But most of all, it’s why this is one of the biggest events in New Orleans sports history.

The Saints and the Pelicans, in their previous incarnation as the Hornets, as well as the Jazz, had star players in the past.

But they were either drafted (Archie Manning, Willie Roaf), came as possibly damaged goods (Drew Brees), got out of town as quick as they could (Paul) or ultimately cost too much (Pete Maravich).

Davis became a Pelican thanks to the lottery numbers coming up right.

He’s choosing to stay because he sees this as the place to fulfill his dreams.

All it took was a little charm, and a lot of money.