The Roman playwright Plautus turned the story of Hercules's conception by Jupiter into a comedy, but the mingling of gods and heroes in a comedic form must have seemed odd to contemporary audiences, since the play's prologue refers to the drama as a "tragicomedy"--the first known use of that term.
Moliere, but Moliere's version was taken even further by the German Romantic writer Heinrich von Kleist. In his Amphitryon, Kleist kept Moliere's introduction of a wife for the servant character Sosa. (She is named Cleanthis in Moliere's text and Charis in Kleist's version.) However, Kleist also added a philosophic complexity lacking in both Plautus and Moliere.
According to myth, the god Jupiter took on the form of the Theban general Amphitryon while he was on a military campaign. Jupiter then slept with Amphitryon's wife Alcmena, conceiving on that night the great hero Hercules. Yes, there are consent issues here, but this is resolved in Plautus's version of the story by the fact that Jupiter is--you know--a god. In the court of Louis XIV, belief in pagan deities couldn't excuse Jupiter's deceptive sexual practices, which meant that some critics interpreted Moliere's play as a satire on the king's numerous affairs.
Instead of drawing attention to the dubious sexual practices of the powerful, Kleist focused on issues of identity that are raised by the story. When Jupiter appears with Alcmena in the first act, he tells her that he is an Olympian who descended to earth as a "sacrifice to love." But when he tries to tell her the truth, she doesn't understand him. Rather, she trusts her eyes, which tell her he is her husband. Jupiter asks her to cherish him as her true beloved, and not merely as her legal spouse. Alcmena responds that he is both, but the god presses on, saying to her:
Alcmena dearest, what I feel for you
Outsoars, you see, as far as to the sun,
What any husband owes you. Disaccustom
Yourself, beloved, to your spouse,
Make a distinction between me and him.
Though she doesn't quite understand what the god means, Alcmena does agree to cherish the night she has just spent with him above what Jupiter calls the "humdrum days of further married life." When he leaves, Alcmena declares that he must be drunk, but then so is she. Presumably, her drunkenness is not from alcohol, but the intoxication of having loved a deity.
The play's second act goes into further detail about the nature of love between mortals and gods. After a tense confrontation between Alcmena and the real Amphitryon--who has been out in the field of battle, and has no memory of the sweet encounter she believes to have been with him--poor Alcmena is about at her wit's end. Jupiter returns, once again in the disguise of her husband, and attempts to comfort her. Though Alcmena has been loving Jupiter in the guise of Amphitryon, the god contends that in her religious devotions, she has always loved Amphitryon in the guise of Jupiter. He asks her:
Who is it that you pray to at his altar?
Is it to him up there above the clouds?
Can your engrossed mind ever comprehend him?
Or can your feelings, in their wonted nest
There spread their pinions in such flight? And is
It not Amphitryon, your beloved, always,
Before whom you bow to the dust?
Alcmena protests that she cannot pray to "white marble walls" but must envision someone's features when she prays to Jupiter. The god accepts that she must have someone to picture when worshiping a deity, but gets her to promise that she will only envision the man who took her on the previous night. In a further promise, Alcmena swears to stay beside him and cling to him as a god, even if Amphitryon should appear before her.
This is precisely what happens in the third act. The general returns again, and meets Alcmena in the company of Jupiter. Since both Amphitryon and Jupiter appear identical, the assembled citizens ask Alcmena to declare which one is her true husband. She chooses Jupiter, who has been standing beside her. This sends the general into a fit, but when Jupiter reveals himself, he proclaims a divine blessing, saying:
Let your black woe and care be now dispelled,
And open up your heart to triumph.
What you, in me, did to yourself, will not
Harm you before my everlasting nature.
If you find your reward amid my fault,
Then I hail you in friendly words, and leave you.
Your fame shall henceforth find, as my world finds,
Its boundaries and limits in the stars.
The awe Alcmena feels before such infinite majesty goes beyond words. The last line she has (which is also the last line of the play) is simply: "Ach!" Kleist's reverence for Jupiter is not found in his pagan source, which gives the last line to Amphitryon. Instead of crying out with inexpressible emotion, the general in Plautus's play simply asks the audience for applause.
What we get in Kleist's version is not paganism as it was, but rather paganism filtered through German Romanticism. While Plautus saw the myth of Amphitryon as an opportunity to get laughs, Kleist viewed it as a window into the sublime.