-- Rock legend Elvis Costello has been flirting avidly with classical music in recent years, collaborating with Anne Sofie von Otter and the Brodsky Quartet to striking effect. Now he's pulled a much bigger rabbit out of his seemingly bottomless hat: "Il Sogno," an hour-long ballet score for symphony orchestra.

Based on Shakespeare's "A Midsummer Night's Dream," "Il Sogno" was composed in 2000 for Aterballeto, an Italian dance troupe, and received its North American premiere on Saturday at Avery Fisher Hall as part of the Lincoln Center Festival. (A recording will be released by DGG in September.) Not only did Costello write it without assistance, he orchestrated it as well, and though the Brooklyn Philharmonic, conducted by Brad Lubman, was conspicuously underrehearsed, the performance was decent enough to leave no doubt that Costello knows what he's doing. The scoring isn't perfect -- the middle register is cluttered and thick-sounding at times, and the vibraphone is used to sugary excess -- but it's perfectly competent.

That alone made my jaw drop. Even Duke Ellington relied on professional orchestrators when writing for symphony orchestra, while Paul McCartney hired so many collaborators to help him produce the embarrassingly bloated "Standing Stone" that I described it at the time of its 1997 premiere as "the first as-told-to symphony." What's more, "Il Sogno" ("The Dream" in Italian), though it rambles a bit, is more than just a long string of songlike cameos placed end to end: Costello has channeled his thematic material into simple, formal structures that he uses in the disciplined manner of a bona fide classical composer.

Am I surprised? Totally. But if any rocker could pull off such an improbable feat, it's Elvis Costello, whose musical curiosity has always been boundless. What's more, "Il Sogno" doesn't sound like anybody else (except for a couple of lyrical passages that reminded me, logically enough, of Sir Michael Tippett's "The Midsummer Marriage"). It's not cut-rate Prokofiev or Bernstein, but a lively, ingratiating piece of mainstream modernism, with decorous snippets of symphonic rock and jazz thrown in from time to time to spice things up. If anything, it's too polite: Costello was clearly on his best musical behavior when he wrote it, and I'm sure he felt he had something to prove to all the "legit" musicians who took it for granted that no mere rock star could bring off so ambitious an undertaking.

Well, he proved it. Not only does "Il Sogno" work, but it stands up pretty well to the inevitable comparison with George Gershwin's concert music. Unlike Gershwin's wonderfully concise Concerto in F and "An American in Paris," it goes on too long (Costello should give some thought to spinning off a five- or six-movement suite) and lacks the high melodic profile that could have made it truly memorable. Even so, "Il Sogno" is more than good enough to recall Irving Berlin's envious remark that Gershwin was "the only songwriter I know who became a composer." If he chooses to, I have no doubt that Elvis Costello can do the same thing.

Mind you, Costello doesn't need to write large-scale orchestral works to be taken seriously as an artist. Rock has produced no better songwriter. But if he really wants to set up shop as a part-time classical composer, he'll need to polish his craft still further. After the unexpected success of "Rhapsody in Blue," Gershwin toiled for 11 years and ended up with "Porgy and Bess." Is Costello in it for the long haul? Or will "Il Sogno" turn out to be a fluke? I hope not.

Newly minted classical musician Elvis Costello, in New York last year.