“Sopranos” star James Gandolfini, who struggled with booze addiction in his final weeks, scarfed down a decadent final meal that included at least eight alcoholic drinks, The Post has learned.

Gandolfini guzzled four shots of rum, two pina coladas, and two beers at dinner with his son — while he chowed down on two orders of fried king prawns and a “large portion” of foie gras, a hotel source in Rome said.

AUTOPSY CONFIRMS GANDOLFINI DIED OF HEART ATTACK

The Emmy Award winner had attended several Alcoholics Anonymous meetings on Perry Street in the West Village, but people who saw him there “didn’t think that he was serious about getting sober,” said a source familiar with the matter.

“I can confirm he has been known to blow lines and drink like an Irish sailor on weekend leave,” said another source.

Photos of Gandolfini in Rome show the actor looking haggard in the days leading up to his death — and he spent a lot of the time with a drink in his hand.

Hours before he keeled over from a massive heart attack, the actor sat down for a 7 p.m. meal with his son, Michael, 13, at the Boscolo Exedra Roma hotel’s outdoor restaurant.

Gandolfini, 51, first ordered a pina colada with two additional shots of rum on the side.

He followed that up with an identical round — a pina colada and two shots — and then downed two beers, the source said.

Gandolfini also enjoyed back-to-back orders of fried prawns slathered with mayonnaise chili sauce — as well as a heaping portion of foie gras.

He ate the entire meal himself. Michael had his own dinner and two virgin pina coladas, the source said.

Nearly “everything [Gandolfini] ordered was fried. Obviously, that’s going to cause problems with your heart,” the source said.

About three hours later, Michael discovered his dad in cardiac arrest in their fourth-floor room.

Six men carried the barechested actor — who was wrapped in a blanket — out of the room, a hotel source said.

Paramedics frantically worked on him on the ride to Umberto I hospital, where doctors spent 40 minutes trying to save him before pronouncing him dead.

The head of the emergency room said Gandolfini appeared to die of natural causes, but officials plan to perform an autopsy.

The previous night, Gandolfini dined al fresco with his son at Sabatini in Rome’s Trastevere neighborhood, downing a Campari and soda and a red wine.

“I remember him because he was a very nice person,” said his waiter, Andrei Burca, 25. “He had a big smile, a big laugh and looked happy.”

Gandolfini’s body is in the Rome city morgue, and the US Embassy will make arrangements to return his remains.

His ex-wife, Marcy Wudarski, flew to Italy to be with their son, Michael.

News of Gandolfini’s addictions first surfaced during his 2002 divorce from Wudarski, who claimed in court documents that he’d go on benders that included kinky sex with other women.

She also said in the filings that he did cocaine with some “Sopranos” castmates.

Gandolfini, who filed a countersuit claiming Wudarski was mentally unstable, was often his own harshest critic.

The burly actor would repeatedly punch himself in the face when he made mistakes on set, GQ reported yesterday.

The magazine said he was spooked by the overnight fame that came with “The Sopranos,” and sometimes blew off work to hole up in his Tribeca apartment.

In February 2002, he was a no-show for an expensive-to-shoot “Sopranos” scene at Westchester County Airport, where producers rented out a huge space, GQ said.

No one could find him until the fourth day of shooting, when he finally called in from a Brooklyn beauty salon, where he had wandered in from the streets.

He dialed the only production-related phone number he could remember, and asked for a car to take him home.

The star regularly lavished castmates and crew with expensive perks to make up for his maddeningly odd behavior.

“All of a sudden, there’d be a sushi chef at lunch,” one crew member told GQ. “Or we’d all get massages.”

In the months before his death, Gandolfini split his time between Tribeca and California, said a source in his New York building.

“He was just a nice neighborhood person who happened to be famous and talented,” said Sara Mattler, 32, a neighbor who stopped by the building to show respect.

In New Jersey, friends and fans remembered the Garden State native as an everyday guy who stayed true to his roots.

“Jimmy was just a regular, regular person,” said Bob Sottolano, 73, who rented a Westwood NJ, apartment from Gandolfini’s sister, Leta. “I met him 30 years ago. No matter how famous he got, he would come over for Christmas and we’d take a few pictures.

“They got to be a another family to me. He’d come in the morning for Christmas and we’d spend part of the day here.”

At the show’s fictional haunts, real people paid tribute to the man who made them famous.

“I’m one of the original Bada Bing girls,” said Diana LoMoro, a dancer at Satin Dolls, in Lodi, NJ, where many of the “Sopranos” strip club scenes were shot.

“I feel very fortunate I was able to share a set with James Gandolfini. I was devastated when I heard. I was really shocked by it. ‘The Sopranos’ was never really over, and now I feel it’s over. No one wanted to believe it would end. They were waiting for a movie. But Tony Soprano is gone.”

A high-school classmate, Donna Mancinelli, 50, said Gandolfini was a jock with great hair.

“He was voted ‘Best Flirt’ with Donna Lange, and he was also voted ‘Best Looking.’ Everyone teased him about his David Cassidy hair, his full head of thick, beautiful hair,” she said.

Sales of “Sopranos” episodes and boxed sets shot up yesterday on Amazon and iTunes, Variety reported, as fans crowded the HBO store in Midtown to collect “Sopranos” memorabilia.

Additional reporting by Reuven Fenton, Jennifer Bain, Brianna Farulla and Georgett Roberts