Never bargain with gods. That’s one moral — there are several — in Mozart’s Idomeneo, which the Florentine Opera will stage Friday night and Sunday afternoon (May 17 and 19).

The title character, the King of Crete, is about to drown in a storm on his way home from leading his troops to victory with the Greek side at Troy. He calls upon Neptune, the god of the sea, to save him. They strike a deal: Idomeneo must agree to sacrifice the first person he sees when he washes up on shore. That’s unreasonable on Neptune’s side and selfish on the king’s side, but business is business. Complications ensue, many of them driven by the presence of Elettra (played by the fabulous Georgia Jarman), the vengeful daughter of Agamemnon and rival of the Trojan Princess Ilia for the love of Prince Idamante.

We’re not accustomed to such moralizing operas, since Romanticism shifted the genre to focus on hot-tempered Italians. Idomeneo, King of Crete, from 1781, predates all that and belongs to an entirely different genre, opera seria. Hundreds and hundreds of such operas were staged in the 18th century. Playwright, poet and rhetorician Pietro Metastasio (1698-1782) laid down its principles and wrote a great many libretti, which countless composers set to music. Giambattista Varesco wrote the libretto for Idomeneo, but it adheres to Metastasio’s rules, right up to the just and happy ending.

“For me, Idomeneo is the last and the greatest of opera seria,” said John La Bouchardière, the director-designer of this new Florentine production. We know him from his smashing 2009 staging of Handel’s Semele. “Mozart took all that was bad about the genre and chucked it out.”

La Bouchardière explained that opera seria was a courtly endeavor staged for an elite audience. Metastasio drew on Classical Greek and Roman drama and myth, often freely adapted for allegorical and instructive purposes. The intent was to uplift, edify and enlighten the nobility in proper noble behavior. Virtuoso singing also came to the fore, in the form of the da capo aria, an A-B-A form. Singers were expected to ornament spectacularly as they repeated the same music.

Opera seria was the natural home of the castrato, male singers castrated in youth to retain their soprano range. Carlo Farinelli, the most successful of the castrati, was a great friend of Metastasio. Opera seria composers inevitably assigned the most heroic roles to castrati, one of many reasons opera seria fell out of favor. Today, countertenors or mezzo-sopranos sing these roles, which is why Sandra Piques Eddy will play Prince Idamante, slayer of sea serpents and lover of Princess Ilia (Marie-Eve Munger).

Karl Theodor, Elector of Bavaria, commissioned the opera for a court carnival in Munich. Mozart was 25; Idomeneo is considered his first mature opera. Varesco, his librettist, was the court chaplain. The relationship, apparently, was contentious. Mozart cut out whole passages from the text and insisted on many changes. He was also dissatisfied with the two leading men and trimmed their parts. After three performances in Munich, Idomeneo largely disappeared from the stage until a revival of interest in Baroque opera in the 20th century.

“I’ve loved this opera forever,” La Bouchardière said, “but people have a hard time with opera seria today. It’s always in togas and stone and moves at the pace of stone. Even in 1781, opera seria was done as a dramatic form. The world had changed. Court performances had become less possible.”

Mozart grasped that and did something about it. La Bouchardière sees in Idomeneo the influence of Christoph Willibald Gluck, a reformer. Gluck turned away from show-off da capo arias and allegory and focused on through-composed arioso and intense human drama.

La Bouchardière said that the pace of Mozart’s recitatives and the elaborate use of chorus show Gluck’s influence. Also, Mozart wrote out the vocal ornamentation, eliminating the need for excessive repeats. So Idomeneo moves along more briskly than the typical opera seria.

“It’s two and a half hours, which is short for opera seria,” he said. “It’s important that the evening moves along.”

Still, the style and story are remote from the 21st century. La Bouchardière wants to help us with that.

“It’s modern,” he said. “I didn’t want to do a toga show — that makes the opera feel older than it is. I want the message to feel universal, I don’t want to leave it at 3,000 years ago. I want it to be about the cycles of revenge.”

La Bouchardière, his cast and Kathy Wittman have been busy shooting video, to be used in the show. It quickly fills in back story, to help us situate events in the opera.

“Modern audiences like stories they don’t know,” he said. “Mozart’s Munich audience like stories it did know. They knew their Aeschylus and their Homer. Our audience might not. They need to understand Elettra’s baggage; that story needs telling.”

The director also employs video to structure the narrative in a modern way.

“I put a spoiler alert at the top of my program notes,” he said. “I use video to consider what might happen next, as they do in Cold Case or CSI. It’s an exciting way to see an opera.”

La Bouchardière even has a little marketing tagline for his approach to this opera, which was old-hat even when it was new: “If you like Cold Case and you like Eine Kleine Nachtmusik, come on along to Idomeneo.”

Performances are at Marcus Center Uihlein Hall Friday, May 18, at 7:30 p.m., and Sunday, May 20, at 2:30 p.m. Tickets are $27 to $109, and can be ordered at (414) 291-5700, the Florentine’s online box office, or the Marcus Center box office, 414 273-7206.