Andrew Bernard, the co-writer of John Fred and His Playboy Band’s No. 1 song from 1968, “Judy In Disguise (With Glasses),” died Thursday morning at his home in Baton Rouge. He was 77.

As co-producer and co-writer with Playboy Band leader John Fred Gourrier, Bernard made major creative contributions to “Judy In Disguise” and the singles that preceded it, “Up and Down” and “Agnes English.” He was also the band’s arranger and saxophonist.

Still feverishly creative in his 70s, Bernard performed and recorded in recent years with Baton Rouge’s Henry Turner Jr. and Flavor and New Orleans singer-songwriter Carlo Ditta. His baritone sax solo and Wurlitzer keyboard playing are featured in Ditta’s 2019 remake of “Agnes English.”

“Andy brought the hitmaking skill to John Fred and His Playboy Band,” Ditta said. “He had a genius about him during that time.”

Bernard also recorded all of the horn parts for Turner’s 2020 album, “Now.”

“Andrew could be one of the most stubborn, rambunctious characters you’d ever want to deal with,” Turner said. “But he was one of the most brilliant horn arrangers and songwriters I’ve ever met. He never gave up on the music business.”

Despite metastasized cancer, Bernard’s wife, Michelle, said Wednesday, “he was doing his music right up to the end. He thought ‘Judy In Disguise’ could be an excellent spy movie. He had all kinds of ideas about it.”

A New Orleans native who grew up in Houma, Bernard moved to Baton Rouge to attend LSU.

In 1965, he joined John Fred and Playboy Band while he was still a music student at LSU. Bernard and Gourrier composed “Judy in Disguise,” their madly catchy pop-soul-psychedelic hit, at an old piano in the two-bedroom house near the Perkins Road overpass where Bernard lived with his first wife and their three children.

“We needed some songs for an album coming up,” Bernard said in 2010. “We were trying to write something for the kids, for the teenagers, that they would like. So, we were going to do something really simple.”

Members of the Playboy Band and Buzz Bennett, music director at WTIX radio in New Orleans, initially disliked “Judy In Disguise.” Bennett, after saying the song was the worst record he’d ever heard, thought otherwise following explosive listener response to the song, predicting it would go to No. 1.

Released in the U.S. by Shreveport’s Paula Records, “Judy In Disguise” was a global smash, charting No. 1 and Top 10 in 18 countries.

John Fred and His Playboy Band toured the U.S. and Europe, appeared on “The Tonight Show Starring Johnny Carson” and Dick Clark’s “American Bandstand” and met the Beatles at Apple Records in London.

A year after the success of “Judy in Disguise,” Bernard left the Playboy Band following his attempt to replace Gourrier as the group’s leader. He also came to dislike “Judy In Disguise.”

“It wasn’t my favorite song,” Bernard said. “I thought it was too dumb and simple. I wouldn’t tell anybody that I wrote it. For 10 years, I wouldn’t play the song. We went all the way to the top, but with nothing coming behind it.”

After his music fame, Bernard worked in the north Louisiana oil patch until the early ’80s oil bust. Bernard carried on in music, leading his own group and performing with his vocalist sister, Judy. He eventually worked with Gourrier again, co-writing songs that appear on the singer’s final album, 2002’s “Somebody’s Knockin’.”

Gourrier died in 2005.

Bernard eventually came to think less harshly of “Judy In Disguise (With Glasses).”

“Especially now that it pays some royalties,” he said in 2010.

Email John Wirt at j_wirt@msn.com