XILITLA, Mexico — He was, the BBC declared, the last of the great eccentrics. A self-described wizard and a poet, he was also a model who appeared in the paintings of René Magritte and Salvador Dalí and hands down one of 20th century England’s most flamboyant aristocrats.

His name was Edward James, and while you may well never have heard of him, just a taste of his story will leave you wishing you knew more.

His various oddities and accolades aside, the thing that James may now be most notorious for—and what drew him to my attention—is the other-worldly surrealist palace he spent two decades building in the Mexican rainforest: Las Pozas.

Roughly seven hours northeast of Mexico City, past Pueblos Mágicos, through the breakneck turns climbing up and down the steep mountains and deep canyons of the Sierra Gorda, lies the rainforest town of Xilitla, the home of this magical complex.

It’s easy to see what drew James to Xilitla in the Mexican state of San Luis Potosí. It is full of turquoise waterfalls and situated near a famous cave where thousands of birds pour out at sunrise and swarm back in at sunset—a visual experience that begs to be narrated by David Attenborough. It is also a region famous for its orchids—which is what originally attracted James.

Just outside the bustling town of Xilitla, amidst a cacophony of animal sounds, rising out from a canopy of trees with leaves larger than me, the towers and sculptures of Las Pozas are unforgettable. Made of reinforced concrete, they are an M.C. Escher sketch made manifest in the jungle. Incan, Egyptian, Greek, Assyrian, Mayan, and Victorian architecture blend together on nine hectares of garden within a park of 27 hectares (roughly 67 acres). Illuminati symbols reside in the same complex as those from Alice in Wonderland. Ancient ruins depicted in the background scenery of sketches by Leonardo da Vinci have been recreated in concrete and stand covered in jungle growth. Stairs spiral up, ending 30 feet above you in empty space. A sarcophagus is used as a vantage point to admire one tower, and sculptures of seagulls act as flying buttresses for another. The buildings have names like The House with Three Storeys that Could Be Five. Cages stand empty that once contained exotic animals including ocelots, crocodiles, kinkajous, and boa constrictors, the caged occupants freed into the jungle long ago. The site has attracted the likes of photographer Sally Mann and boasts a mural by a personal favorite of mine—Leonora Carrington. Given its name (Las Pozas translates to “the pools”), it is unsurprising that the complex boasts its own stunning waterfall that tumbles down through surrealist ruins into oddly shaped pools in which visitors are welcome to swim. It is a work that required a unique creator—somebody of incredible vision, resources, and just the right amount of eccentricity.

Edward James was born in England in 1907, the only son (he had four sisters) of William James, the heir to the Phelps-Dodge fortune, and Evelyn Forbes, one of Edwardian England’s most fabulous socialites. James once described her as the height of Edwardian fashion, wearing “things on top of things”—sable furs, jewels, and so on. King Edward VII, who was a frequent guest at James’s parents’ 300-room estate (along with King Alfonso of Spain and the pretender Manuel of Portugal), was his godfather.

William James died when Edward was only five. However, the true identity of Edward’s father was the subject of much society gossip—it was widely believed that King Edward VII was in fact his father. James disputed this, contending in the 1974 BBC documentary The Secret Life of Edward James that it was actually his grandmother who had the affair with Edward VII, which would have made his mother the king’s illegitimate daughter.

James’s childhood, while gilded, was far from perfect. His mother was “sort of indifferent” and James summed up her maternal qualities by telling a story of how one day she shouted up the main staircase of their estate called West Dean for the servants to send one of the children down to go to church with her. When the servant asked which one, she retorted, “the one that goes best with my blue dress.”

It was during this childhood, James would later claim, that his surrealist worldview was born. His days were full of hours trapped alone indoors, and so he would invent imaginary worlds that he furnished with household objects.

“As an aspiring poet and student at Oxford in the mid-1920s he showed an incredible ability to create extraordinary, essentially surreal environments in his lodgings,” explains Margaret Hooks, the author of the seminal James biography, Surreal Eden: Edward James and Las Pozas, in an interview with The Daily Beast. “Combining disparate materials and objects, juxtaposing medieval tapestries with London Underground posters, wiring speakers into a neoclassical bust of a Roman emperor to blare the latest in French music and American jazz.”

James reportedly also made his mark at Oxford with his fortune—driven around in a Rolls Royce, flown in a private plane, and decorating his room in a velvet trim. It was also the beginning of what would be his lifelong funding and participation in the creation of art. He co-published work with John Betjeman and Rex Whistler. Eventually, Hooks tells The Daily Beast, “a poetic sensibility, attraction to beautiful objects, and his love of the fantastic brought him into contact with surrealist circles, though he had little interest in their manifestos and incessant infighting.”

James would spend the ’20s and ’30s supporting his friends in the surrealist circle. He began by merely buying artwork from broke friends who he thought were talented. (He did not buy from the bad ones, he said, because they shouldn’t be encouraged.) Magritte and Dalí were the two most famous names who owed much of their early financial success to James. He was also friends with Picasso and Man Ray, and bought their work.

But James never saw himself as a collector.

“He thought of himself as a friend as well as supporter of the artists he knew at the time and simply bought or commissioned the work of those he liked most,” Hooks points out. “What’s more, he had often collaborated with them on the pieces they produced, providing seminal ideas and financing for several of Dalí’s works, including the Lobster Telephone, the Pluvial Taxi and the famous Mae West sofa.”

The ’30s would also see tragedy befall James. In 1930 he married the Austrian stage actress Tilly Losch, who reportedly wed him thinking he was gay and the marriage was just for show. James, however, was passionately in love with her and tried to keep her love by financing a play that he hired George Balanchine to direct with a score and lyrics by Bertolt Brecht and Kurt Weill (which was in fact their last score together). But even that was not enough to stave off divorce. The split devastated James, who also claimed that Losch aborted three of their pregnancies that would have given them children.

“She was apparently the love of his life and the separation from her was traumatic. He never remarried and there appears to have been no other intimate partner of significance after he divorced Tilly,” Hooks says.

It was also devastating because it was a very public split. James accused her of having affairs, and she accused him of being gay. In the end, one of her lovers, the Russian Prince Serge Obolensky was ordered to pay legal costs. While James won, his choice to fight the divorce in public cost him many of his friends and his family shunned him.

In 1938, James fled for New York to manage Dalí’s exhibit at the New York World’s Fair, but it was, as the BBC documentary notes, “the beginning of a semi-permanent exile.” After New York he went to Los Angeles to join his friends Aldous Huxley and Christopher Isherwood by attempting to become a mystic under Gerald Heard (who would co-found Alcoholics Anonymous). But there James felt slighted and patronized because of his wealth.

In 1947, James—along with his new friend, Plutarco Gastelum, the manager of the telegraph office in Cuernavaca he met in 1944—came across Xilitla on a quest for orchids. James bought an old coffee plantation, and for nearly 20 years, primarily for the orchid collection he maintained on the plantation, he frequently returned. While there, James wished to live out a hermetic life by the waterfalls on his land. The pools, he said, were his bathroom. But one day he was shampooing his hair in the pools below the waterfalls when a noise in the brush caused him to stop and he opened his eyes to see what he thought were 12 penguins watching him. Eventually, after rubbing out the soap, James realized they were nuns who wanted him to build a health clinic for the local population.

While James became close to the population and did fund major projects like the health clinic, it wasn’t until 1962 that his relationship with Xilitla changed forever.

“For three days white ashes fell and burned everything,” James said the villagers told him. There had been a freak snowfall, and many of the orchids had died.

In response, James embarked on what would be his signature project, a project that would only end 22 years later with his death in 1984, but one that would fill the jungle with a beauty far more permanent than his beloved orchids.

“[James] once said that had if he had proposed the kind of fantastic structures he wanted to build at Las Pozas to workers back in England, they would have told him he was dreaming, it wasn’t possible, that it couldn’t be done,” Hooks tells The Daily Beast. In Mexico, however, there was much more acceptance of James’s eccentricities.

“There was a completely different perspective on what was ‘normal’ and ‘acceptable,’” she continues. “I think he found this very liberating, having found perhaps for the first time in his life a place and a community that were accepting of his unusual imagination and placed no limits on his creative energies.”

The palace’s construction was overseen by James’s friends Plutarco, who also built a surrealist inspired mansion in Xilitla in which he, James, and Plutarco’s family resided. The fabulous edifice still exists, and is now run as the hotel El Castillo by Plutarco’s daughter (who James also adopted) and his granddaughter. Its halls are filled with the fantastical molds James used to create his jungle palace, as well as a painting by his friend Leonora Carrington. It is even possible to rent the room in which James once lived, which gazes out with a 180-degree view over the rainforest mountains.

“I can’t buy any pants. Nobody’s as fat as me in this town.”

That’s James, walking around the town of Xilitla in his teeter-totter gait in the BBC documentary The Secret Life of Edward James. By the late ’70s, he has developed the wizard look to the fullest with a magnificent white beard, but one could be forgiven for saying it was Santa Claus-esqued given his swollen belly. He walked around town or around the jungle in a variety of outlandish outfits—from lime green cable knit sweaters to elaborate silk robes—often with birds on his shoulders or chatting with animals he encountered. His voice was slightly high-pitched but he was an absolute delight to listen to as a raconteur, particularly because he did impressions so well. From time to time he said outlandish things, e.g., when he says he is on friendly terms with the other witches in Xilitla. In Mexico he rented suites adjoining his own in hotels for his boa constrictors and fed them mice from the market and rats (cleaned and groomed) from laboratories.

James was, and still is, treated like a god in Xilitla. Hooks recounts a story from the late ’70s wherein James decided to light up Las Pozas, putting light fixtures “in the most unusual places, not only inside and around the edifices and sculptures, but behind waterfalls, high up in the trees. He envisioned a fantastic light-and-sound experience and when the electric company gave permission for the power to be turned on in 1979, the workers, their families, and everyone in the town and surrounding area was invited to see Las Pozas and the jungle illuminated at night for the first time in their lives.” It was unforgettable, Hooks says, “the jungle suddenly illuminated with multi-colored lights, the animals and birds scurrying about, dazzled by the light, the workers and villagers looking up in awe at this spectacular sight, seeing the jungle in a way they had never seen it before.” And only James could have thought to do this, and then funded it.

He spent what was then an estimated $1,000 a week on construction, employing over those decades roughly 150 workers. When he died in 1984, he had spent an estimated $5 million.

“He was always looking for ways to continue to fund his building of Las Pozas, spending vast sums against the counsel of the attorney who oversaw his finances and willing to sell off the works of art he loved in order to create the structures he was making there,” Hooks says.

“The incentive was,” James declared in an interview, “pure megalomania.”

He had no architectural training, but he had some experience, having famously redesigned the interior of his family cottage retreat as a surrealist space. The house, designed by none other than Sir Edward Lutyens (who had too much of a “cottage look” James snidely said) was given a makeover with psychedelic patterned walls, Dalí’s lip sofas, a bed modeled on Napoleon’s hearse, and a bathroom of translucent alabaster. James did apparently show some restraint, as he “resisted some of Dalí’s extreme ideas, such as drawing-room walls that heaved in and out like a dog’s stomach.”

Despite that lack of training, or perhaps as a result of it, Las Pozas is utterly unique. When asked about how his surrealist friends responded to James’s palace, Hooks says, “By the time he got around to creating Las Pozas, decades had passed since his early collaboration and patronage of Dalí and Magritte. But artists he knew and befriended in Mexico visited him at Las Pozas regularly. These included the Surrealists in Mexico, among them Gunther Gerso, Remedios Varo, Leonora Carrington, who painted a mural on the wall of his home in Xilitla, and Pedro Friedenberg, who designed the pair of hands that Edward turned into sculpture near the entrance to Las Pozas. These artists were intrigued and appreciative of the work he was doing there.”

While Xilitla and its residents may have treated James like a god, he also received something from this place. In one touching (but also slightly out of touch) moment in the documentary, James says that what he loves about Mexico is that in England he felt oppressed because he was never punctual and “slightly illogical” whereas in Mexico there is no such thing, he says, as punctuality and logic do not hold the same value.

James’s story is bigger than Las Pozas, bigger even than his support of surrealism. In the ’60s, partly for tax reasons, James created the Edward James Foundation and turned over his massive West Dean estate for the creation of the West Dean College, which became an important center for learning for the arts, including tapestry weaving, furniture making, and clock repair. In addition to his aforementioned early support of Betjeman, James was also a patron of the poet Dylan Thomas and the composer Igor Stravinsky. He was also an integral part of the preservation of the Los Angeles Watts Towers.

“I gave money to help humanity,” he boasted.

While only a man of genius and unconventional character could have led the life he did, James clearly struggled at times with his nature.

“I never wanted to be an eccentric. I’ve tried to conform,” he complained in the BBC documentary. “One is an eccentric entirely against one’s own will.”

When James died in 1984, Plutarco and his family took over. But the jungle being the jungle, the property proved to be too expensive to maintain. My guide at the site told me that James always imagined the ruins slowly fading into the rainforest, the intention being that someday an archaeologist would find it and be utterly perplexed by the mish-mash of styles and buildings.

In 2007 it was sold to two of Mexico’s billionaires (Banamex’s Roberto Hernandez Ramirez and Cemex’s Lorenzo Zambrano Trevino) as well as the state of San Luis Potosí for a reported $2.2 million. It is now visited by an estimated 100,000 visitors a year, and the foundation running the gardens works to maintain and restore what was built of James’s vision.

In a world in which the forces of globalization squeeze and pull the world inexorably closer and the great characters and eccentrics of the 20th century are fading fast, there’s something inspiring about one odd man’s dream palace decaying amidst the jungle in a remote part of Mexico.