During the 1975 Carnival season in New Orleans, Paul McCartney celebrated his first and only Mardi Gras.

Forty years ago this month, McCartney, his wife, Linda, and members of the former Beatle’s 1970s band, Wings, flew to New Orleans to record their fourth album, “Venus and Mars.” And on Fat Tuesday, Feb. 11, 1975, the McCartneys waded into the holiday revelry, masking as a pair of clowns.

“We went on Charles Street,” McCartney later told a reporter.

“And Canal Street,” Linda McCartney added. “We were in the crowd, man. We were right there.”

The recently released, book-style deluxe edition of “Venus and Mars” features the original album, a disc of bonus songs and a DVD. The DVD contains footage of McCartney and Wings recording their Professor Longhair-inspired song, “My Carnival.”

The McCartneys, their children and the band stayed at Le Richelieu Hotel in the French Quarter. The entourage, including singer-guitarist Denny Laine, guitarist Jimmy McCulloch and a newly recruited American drummer, Joe English, set up shop in Allen Toussaint and Marshall Sehorn’s Sea-Saint Recording Studio in Gentilly.

Recording engineer Alan O’Duffy hired Tony Dorsey, a trombonist and Houma native, to lead the horn section and make arrangements. Dorsey, in turn, hired New Orleans musicians with whom he’d attended college to play horns. Toussaint played piano and guitar for one song, “Rock Show,” and the Tuxedo Brass Band recorded a brass section overdub for McCartney’s Little Richard-based rendition of “Baby Face.”

Later, during a combination album wrap party and press conference on the river boat Voyageur, McCartney said he’d wanted to sparingly use the local talent.

“Mainly we’re coming here to make our own album,” he said. “I don’t like to come to a place and use too much of the local talent, because you get people saying, ‘Oh, they’re taking our style.’ … So, generally we keep pretty much to ourselves — unless there’s another special thing we’d like, and we’d ask someone to help us on.”

“My Carnival” was that something special.

“There was no sort of Cajun feel, really,” McCartney said, “except for one song — a bonus thing we did, ‘My Carnival,’ which was very taken from the local feel.”

Wings recorded “My Carnival” at Sea-Saint the day after Mardi Gras, with locals George Porter Jr., bassist in The Meters, adding percussion, and Benny Spellman (“Fortune Teller”) singing backup. The song’s piano, horns, hand-clapped rhythm and celebratory vocals echo the music of Professor Longhair, Huey “Piano” Smith and the Clowns, and other classic New Orleans rhythm-and-blues acts.

Sidney Smith, a local photographer, was hired to shoot photos of the McCartneys and Wings in New Orleans. Just 20 years old and a Beatles fan since he was 9, Smith couldn’t believe his luck. He’d photographed many stars, including The Who, Led Zeppelin, Bruce Springsteen, the Grateful Dead and Cat Stevens, but nothing topped McCartney.

The Wings entourage, Smith recalled, went to see many local acts perform during those few weeks in New Orleans. Doing so fulfilled a long-held wish for the leader of the band. The Beatles wanted to visit local music clubs in September 1964, when they performed at City Park. The crush and chaos created by frantic fans who mobbed them at every turn, however, made doing so impossible.

McCartney, asked what musicians he’d heard during his New Orleans 1975 visit, said, “Well, we saw Professor play. Professor Longhair. And he’s the greatest. He’s a classic. I love ’em.”

During Wings’ Sea-Saint sessions, Professor Longhair, Earl King, Spellman and other local stars visited McCartney and Wings in the studio. Dr. John showed up and showered everyone with glitter dust.

“All the New Orleans royalty was coming to see Paul,” Smith said.

“We met all those players,” Wings’ Denny Laine said. “We were very much part of the scene down there.”

In addition to “My Carnival,” McCartney recorded his impression of Professor Longhair’s Carnival classic, “Mardi Gras in New Orleans,” aka “Go to the Mardi Gras.” He also sang and played the song in person for the amused Professor Longhair, the deluxe “Venus and Mars” edition’s extensive notes report.

Released in May 1975, “Venus and Mars” reached No. 1 internationally. It’s sold more than four million copies. The original album featured the No. 1 single, “Listen To What The Man Said,” but not “My Carnival.”

McCartney’s company, MPL, however, released a Professor Longhair album, “Live at the Queen Mary,” in 1978. It was recorded on the British ocean liner in Long Beach, California, during the wrap party that followed “Venus and Mars” overdubs and mixing in Los Angeles.

Professor Longhair told Philadelphia journalist Peter Stone Brown about his encounters with McCartney during a 1979 interview.

“Somebody steered him up to wherever we were working and he came and listened and he enjoyed it,” Professor Longhair recalled. “So he said, ‘Now that I’ve come listen to you, why don’t you come listen to me?’ And I said, ‘Well, where are you?’ And he was making a recording down by Sea-Saint. And the next thing I know he was sending for us to come out and play the gig for him on the Queen Mary.”

Ten years after the Sea-Saint sessions and five years after Professor Longhair’s death, McCartney released “My Carnival” as the B-side of “Spies Like Us,” title song for a 1985 Chevy Chase-Dan Aykroyd movie.

The 45’s label says: “Recorded in New Orleans & dedicated to Prof. Longhair.”