Ray Nagin and Greg Meffert didn’t really know each other in 2002, when the newly elected New Orleans mayor hired the big-talking, high-flying entrepreneur to run the city’s tech operations. But it took almost no time for the two City Hall newcomers to become each other’s enablers.

Nagin gave Meffert a showy perch and an ever-growing portfolio that stretched far beyond his digital expertise to areas such as planning and historic landmarks, under the tenuous argument that the mayor wanted to automate those functions. When Meffert declared himself a deputy mayor after Hurricane Katrina — a title that didn’t yet formally exist — it was with the understanding of how long his leash was.

In turn, Meffert offered Nagin the assurance that he didn’t have to sweat the details of government, because his trusted aide was on it. Nagin wasn’t one to ask questions; he just sat back and enjoyed the 21st-century swagger that Meffert lent his administration, no matter how little the city had to show for it.

When both men ran into financial trouble, the dynamic persisted.

Nagin gave Meffert the executive order that enabled him to funnel millions in no-bid work to his old friend Mark St. Pierre and turned a blind eye to their arrangement, which included layers of subcontracts meant to shield the relationship from public view.

St. Pierre rewarded Meffert with a credit card he used to charge everything from meals to electronics to strip club outings, use of a yacht and steep monthly payouts after he left City Hall.

And Meffert cut Nagin in on the bounty. He got St. Pierre to sponsor luxury trips for the Nagin family to Jamaica and Hawaii, pay for cellphones for the mayor’s kids and provide free lawn care, and he even threw Nagin a fundraiser on the yacht he claimed to own.

It was a perfect, and perfectly dysfunctional, friendship. The mayor and his aide met each other’s needs, fed one another’s egos and covered up each other’s insecurities.

My, how times have changed.

True, both are heading to prison, Meffert for his dealings with St. Pierre and Nagin for that and several other schemes.

But to the day Judge Ginger Berrigan sentenced him to 10 years following a slam dunk of a jury conviction, Nagin remained unapologetic.

Meffert, who appeared last week at a sentencing hearing four years after he pleaded guilty and agreed to help the feds nail St. Pierre, Nagin and several others, was the picture of remorse, as seemingly self-aware as Nagin remained tone-deaf.

Pleading with U.S District Judge Eldon Fallon for a downward departure from the eight years suggested by the guidelines, Meffert offered a stunningly accurate self-diagnosis. He copped to having an outsized ego, and he accepted full responsibility — even as he took a few indirect swipes at the media that uncovered some of his schemes and has covered his downfall.

“The truth is that I’ve lost everything I had. I’ve lost the ability to even provide for my family. I lost my name, in a sense, because of all the hundreds of thousands of articles on Google and everywhere else. Those will follow me for the rest of my life.

“I’m sorry the most because it was wrong. The thinking that went into it is alien to me now. ... All I can come to is — and in the trial testimony, maybe you can see — it was hubris; it was vanity. That’s why so much of it was spent on such idiotic things. ... It was all this, ‘Look at me. I’m somebody.’ Now, I’m a nobody. And I’ve got no one but myself to blame for that.”

The prosecutors who’d pursued Meffert backed him up and seconded his plea for leniency. Assistant U.S. Attorney Matt Coman called Meffert the very model of a cooperating witness, and lauded his “important, truthful” testimony against Nagin and St. Pierre at trial and his help landing three related guilty pleas. He called Meffert a changed man and argued that his example would encourage others to come forward.

In the end, Nagin’s defiance may have the same effect. He too could have gotten a deal had he owned up to his misdeeds, something like Meffert’s 2 1/2 years, far less than the decade he was actually pretty lucky to land (St. Pierre originally got a whopping 17 1/2 years after declining to plead and forcing a trial, but his sentence was reduced to five years in exchange for his subsequent cooperation)..

So give Meffert this: Once caught red-handed, he figured out how the game was played and made the justice system work for him as best he could. In retrospect, Nagin could have used a friend like that. Just maybe a different one.

Stephanie Grace can be contacted at sgrace@theadvocate.com. Read her blog at http://blogs.theadvocate.com/gracenotes. Follow her on Twitter, @stephgracenola.