NEW YORK — Johnny Fox, a sword-swallowing magician who presented his quirky art form to enthusiastic audiences around the world, has died.

The 64-year-old had been battling cancer and died Sunday at a home in Maryland, according to close friend Barbara Calvert. He passed away peacefully, with a smile, while surrounded by loved ones who gave him a standing ovation, she said.

Jules Smith, the president of the Maryland Renaissance Festival, said Fox – though ailing – completed a nine-weekend run there in October.

His haunts included New York, where he ran an oddity-filled Manhattan museum called Freakatorium for 5½ years. The items on display included a shrunken head, a two-headed turtle and clothing from circus performer Tom Thumb, Smith said.

“He even had a glass eye from Sammy Davis Jr.,” she said.

Fox also performed at Coney Island’s freak show.

“He was one of the finest examples of a sideshow virtuoso as well as being a celebrity within our own culture,” Patrick Wall, general manager of the nonprofit arts organization Coney Island USA, told the New York Daily News . “We lost one of the best. … He had a dynamic stage presence and just a complete love and commitment to what he did.”

Fox was born in Minnesota on a Friday the 13th and raised in Hartford, Connecticut. He got his professional start in St. Petersburg, Florida, according to Smith, who was a friend for 38 years.

“He was very proficient at magic, but people started stealing his bits,” said Smith. Fox figured it would be harder to steal a sword-swallowing act.

“He started with cooked spaghetti – swallowing, holding the end, pulling it back out,” said Smith. Then “he did a string and a key like Harry Houdini, someone he admired greatly, until he could regulate his gag reflex.”

Then came (gulp!) the swords. There were admittedly a few mishaps, but within eight months he’d mastered it.

Working before a live audience or on TV, Fox made it his mission to introduce families to his world of “circuses, carnivals, sideshows, and the life of people involved in them,” said Smith – and to lend a hand to his fellow performers.

A celebration of his life will be held in Maryland at a future date.