Kirsten Dunst in “Melancholia,” a Magnolia Pictures release. (Photo courtesy of Magnolia Pictures)

It’s easy to come up with a roster of significant works that were controversial when they were new; think of Stravinsky’s “Rite of Spring,” James Joyce’s “Ulysses” or Picasso’s “Guernica,” for starters. But every now and again, the controversy persists for years to come.

Last Year at Marienbad” (1961), the ornate and eternally inconclusive collaboration between “new novelist” Alain ­Robbe-Grillet and filmmaker Alain Resnais, continues to turn up on lists of both the greatest and the worst films ever made. All these years later, “Einstein on the Beach” (1976), a stark, plotless five-hour opera by Philip Glass and Robert Wilson, inspires rapt, trancelike ecstasy and bored, water-torture irritation in listeners, without many in-betweeners.

And now, if initial response is any indication, I would nominate Lars von Trier’s “Melancholia” as a prime candidate for controversy for decades to come. With the possible exception of “A Serious Man” (2008) by the Coen brothers (which was, by design, a much more humble production), I can’t think of any film released in the past decade that has divided viewers so profoundly.

Those who love it (the word is not too strong) watch “Melancholia” again and again, pressing it on their friends with evangelical fervor, already preparing mournfully for that day when it can no longer be viewed in its proper home — the dark recesses of a movie theater. But those who don’t love “Melancholia” are likely to hate it — really hate it — for what they consider its nihilism, its pretension, its improbabilities.

No objectivity from this camp. I’m crazy about “Melancholia,” which has already taken a high place among my favorite films of all time.

Scoring the film

The Web site for “Melancholia” calls it “a beautiful film about the end of the world” — and that’s fair enough, so far as it goes. I would add that it reminds me of some inspired cross between Ingmar Bergman’s “Cries and Whispers” and Stanley Kubrick’s “2001: A Space Odyssey.” Like these films, “Melancholia” is slow, stately, gravely formal and difficult to summarize. But there is another tie: It is impossible to imagine any of these films set to any other music than the music the filmmakers selected themselves.

Again, the music was chose n, not composed expressly for the films. As impossible as it is to believe 44 years later — Richard Strauss’s tone poem “Also Sprach Zarathustra” was not an especially well-known piece when Kubrick employed its first 90 seconds to represent the dawn of humanity. Now this opening is celebrated worldwide as “the ‘2001’ music” and it is among the most popular works in the repertory, even if most listeners don’t stick around for the remaining 30-odd minutes of “Zarathustra.” Kubrick also made use of a haunting miniature from Aram Khachaturian’s “Gayne” ballet and “The Blue Danube” by Johann Strauss Jr.

In “Cries and Whispers,” the music is so essential that every time it enters, it is as though another character has been introduced to the action. There are only three pieces in the film — another work by Johann Strauss Jr. (the “Emperor Waltz”) emitting from an antique music box; a simple, melancholy mazurka by Frederic Chopin (Opus 17, No. 4) played by Bergman’s then-wife, pianist Kabi Laretai; and the “Sarabande” movement from the Cello Suite No. 5 by Johann Sebastian Bach. The last of these, in Pierre Fournier’s recording, is both searing and convulsive: It is introduced during an unexpected reconciliation between two quarreling sisters (played by Liv Ullmann and the late Ingrid Thulin) and speaks of an emotional release beyond the power of words.

And so with “Melancholia.” With the exception of some traditional pop tunes played at an ill-fated wedding (Kirsten Dunst and Alexander Skarsgard are the unhappy couple) von Trier has opted to build his musical world entirely from the Prelude to Act I of Richard Wagner’s “Tristan und Isolde,” quite possibly the most influential music of the late 19th century.

What made the “Tristan” music so radical was its harmonic restlessness, the way it moved from key to key in an endless, yearning fluidity to the point where the whole idea of a settled “tonality” hardly mattered anymore. It was possible to dislike what Wagner had done (some early critics found the opera pornographic) but never to ignore it. Suddenly there were mini-Wagners everywhere and some of them grew up to be leading figures in their own right — Gustav Mahler, Richard Strauss, Jean Sibelius and Arnold Schoenberg, among others.

To risk teaming a new film with “Tristan” (the prelude to Act III makes an appearance as the titles roll) was an audacious decision and could have ended disastrously. Indeed, the first time I saw “Melancholia,” I was bothered by the way the music was reiterated and, on occasion, looped and re-sequenced. And yet, after all, it works. “Tristan,” in common with “Melancholia,” is a seductive, surpassingly beautiful and not entirely healthy study of love and death — of the way they intertwine, of their enduring mystery to us even as we are experiencing them directly. They haunt like a full moon — or, for that matter, like a hitherto-unknown planet that has emerged from behind the sun and now threatens the earth (the existential dilemma in “Melancholia”).

Despite his textual experiments with the “Tristan” prelude, it is obvious that von Trier shares a reverence for the power of great music with Bergman and Kubrick. (With Luchino Visconti, too, for that matter: The best moments in that director’s over-the-top and largely unworthy adaptation of Thomas Mann’s “Death in Venice” are those when Mahler’s Symphony No. 5, the ancient city itself and the suffering face of actor Dirk Bogarde combine to create something like choreography.)

Directorial choice

This is not the usual way for a filmmaker to go. There are countless worthy scores that have been created especially for the films they complement. On occasion, they are the best thing about the whole endeavor (David Mansfield’s fresh, sweet take on American folk music in the notoriously bloated “Heaven’s Gate”). Other times, they may be attractive pieces in themselves but wildly out of place where they are (what did the synth-pop of Vangelis in “Chariots of Fire” have to do with the British empire under King George V?). Sometimes, the score will be the principal element in a film, as in “Koyaanisqatsi,” where the music of Philip Glass effectively propels the action. Other films are more sparing: In Bergman’s “Winter Light,” the only music we hear is that played and sung in two church services.

But von Trier has had the courage to yoke his film to a revered classic. For me, he lives up to this dare and then some. Moreover, “Tristan” seems one of the great sources for “Melancholia,” in spirit if not in fact, right up with “2001,” “Cries and Whispers” and the “dream plays” by the Swedish author August Strindberg.

You may well feel otherwise, as “Melancholia” is clearly a divider. Nevertheless, I’m heartened to find any work of art out there that is still capable of inspiring so much genuine passion, admiring and otherwise. The debates over “Einstein” and “Marienbad” are now decades old, and I hope they will continue forever. Let one about “Melancholia” keep them company.

Page, a former Washington Post critic, is a professor of music and journalism at the University of Southern California and the author, most recently, of “Parallel Play.”