WHICH ARTIST best symbolized the late, not-very-lamented 20th century? One clear choice has to be Franz Kafka, that expert chronicler of bureaucratic nightmares, who seemed to realize better than anyone how out of our control our own institutions had become, and how willing we would be to submit to them anyway. But the last hundred years were also about things other than dread and faceless organizations, things so outsized that a sickly insurance clerk scribbling away in his room could never understand. It was also the age of celebrity, of con-artist bravado, and of a wonderful new toy called cinema. So put Orson Welles on the list as well, and wonder why the two men's "collaboration," The Trial, has taken so long to be recognized as the beautiful, lucidly hilarious comic masterpiece that it is.

The story of how the film came to be made, like every story that floats around Welles, is delightful in its portrait of how offhandedly genius can operate. In 1962, on the set of Austerlitz, where Welles was undertaking another of his showy cameos to finance yet another of his dream projects, the producer Alexander Salkind approached him with a list of 15 novels whose options Salkind had purchased. Welles glanced through the list and settled on Kafka's book.

It seems at first an odd match -- the dissatisfied writer who wished to consign most of his works to anonymity, and the relentlessly self-mythologizing director who never let his public image fade -- and the standard take on the film for years was that it was a failure. Critics complained that The Trial failed to fully capture Kafka's mordant precision, and that the attempt to do so had further drained the film of Welles' usual baroque generosity. But time has caught up with the film, just as it had to with the novel. Though Welles may forever be a minority of one in declaring it his best work, The Trial now stands unquestioned as one of his finest achievements, the born showman respectfully but unapologetically spicing up a difficult sell.

Shot in lovely, starkly contrasting black-and-white, the film unites disparate locations scattered throughout Europe (a Parisian train station, a warehouse in Zagreb -- or is that the other way around?) into one nameless, decaying Old World city. This is Kafka's locale as well, but the setting has the looming, distorted quality that is quintessentially Wellesian. Doors open to rickety, ill-constructed hallways or endless stacks of unfiled reports; rows upon rows of typists sit in an open hall, their supervisor monitoring them from a raised platform; buildings teeter over people's heads, threatening to crash. Though Joseph K.'s arrest, as in the novel, takes place "one fine morning," with the sun gleaming in through a window, afterwards it is somehow eternally dusk or pitch-black night. And all the while the camera glides, scurries, tilts -- always managing to capture an unexpected vantage point.

In the midst of all this visual extravagance, holding everything together, is Anthony Perkins in the other immortal role of his career. By turns edgy, angry, lustful, disgusted, or bored, Perkins' K. isn't merely a great performance; it's arguably the only performance in a Welles film -- barring, as always, the ever-petulant Akim Tamiroff, on hand as the wretched Block -- that the director allowed to outshine his own. (Though Welles can't resist a grand entrance as the Advocate, steam rising from his face as he removes a hot towel.) When the film veers furthest from its source, as it was Welles' typically romantic decision to "update" its moral for a post-Nazi world and give us a hero who fought back at least a little, it's Perkins who makes the alterations believable, even necessary.

Peter Bogdanovich reported that when the film premiered, the audience sat fuming, while Welles and his companion Oja Kodar howled with laughter at how funny the film was. Of course, Max Brod wrote that the same laughter could be heard when Kafka read his stories to his friends; even the writer sometimes had to stop and gather his composure. So, where it really counts, it appears Kafka and Welles weren't so far apart after all. When things get as bad as they do for Joseph K., sometimes all you can do is laugh.