For the first time in over 300 years, a new fountain has sprung up in the legendary gardens of Versailles.

Made from 2,000 glass beads, Les Belles Danses is a new permanent installation in the royal estate. It was designed to honor Louis XIV, better known as France’s powerful and meticulous “Sun King.”

The fountain’s creator, French sculptor Jean-Michel Othoniel, turned to the history books for inspiration. Louis XIV was obsessed with the design and upkeep of his gardens, explained Othoniel at a talk at the French embassy in New York this month, and was among the first to intentionally use art for political influence.

When Louis XIV moved his court from Paris to Versailles in 1682, he spared no expense to transform the rural hunting lodge 12 miles from Paris into a lavish estate. The new Versailles was designed to embody French superiority in all matters, with over 45 kilometers (28 miles) of gardens and over 2,000 water jets.

The early engineers who built Versailles’s first dazzling fountains also made France’s canons at that time. To create the impression that France had the ability to use and constantly show off this quasi-military technology, the king himself wrote a manual for the use of Versailles’s gardens, called Manière de Montrer les jardins de Versailles (How to Present the Gardens of Versailles), which he annotated by hand and modified six times before his death in 1715.

One illustration in the book shows specific walking paths, and includes meticulous instructions for groundskeepers on when to turn on the fountains in each grove. “This was actually a trick,” explains Othoniel. “He wanted to impress with the water in the garden but Versailles did not have the power to run so many fountains at the same time.”

Important visitors following Louis XIV’s tour were tricked into thinking that all of Versailles was lush with continuous and spectacular waterworks. The water show, was in fact, Louis XIV’s way of reminding ambassadors about France’s political might.

Othoniel, who worked closely with landscape architect Louis Benech on the once-in-a-lifetime commission, drew inspiration for Versailles’s new foundation from Louis XIV’s own dance instruction book.

In a volume containing hand notations for baroque dances, the 51-year-old artist, who is known for large-scale sculptures of tangled glass orbs, spotted an image that resembled his own work.

He then reinterpreted the notes, working with glass blowers in Basel, Switzerland, to make the large gold and blue glass beads for Les Belles Danses. Gold leaf was applied to each glass bead by hand, glazed, and sealed—a process that would take five days for each bead. For the installation in Versailles, each bead had to be adjusted by hand to make sure that the trajectory of the water followed the curves of the sculpture.

“It was a crazy project, the biggest piece I’ve ever worked on,” said Othoniel. “But it was a very moving to be in Versailles as a French artist, building something there.”

With Les Belles Danses, Versailles’s waterworks also got their first tech upgrade in three centuries.

Like all other fountains in the gardens, Les Belles Danses is managed by “fountaineers” from the same families that once tended waterworks in the reign of the Sun King. But while the others are turned on and off with a key, and cleaned with schools of fish, Othoniel’s computer-controlled marvel can be managed remotely. It is the first fountain to grace Versailles with a computer-controlled filtration system and automatic pumps.

“It was a big shock for them, and a big fight for us,” explained Othoniel. “But now they are the biggest fans of the project because they can run the fountain through their iPhones.”

A new book, Les Belles Danses, goes deeper into the making of the remarkable fountain.