“The Aviator” is a spectacular whirlwind of a picture, a technical tour de force of cinematography and editing. It is Martin Scorsese’s best, most confident work in years. It is a relief for those who worried that his visual flair and technical skill had become more important to his films than character and story. Most importantly, “The Aviator” is a movingly sympathetic, marvelousaly entertaining portrait of an archetypal American figure.

The film can be considered Scorsese’s “Citizen Kane,” a hugely ambitious biography of creative genius and business mogul Howard Hughes (Leonardo DiCaprio). Hughes, a towering celebrity for most of the 20th century, was brought down by his obsessions and eccentricities and eventually driven into seclusion by his mental illness.

The film begins in 1927, with Hughes using his inherited fortune to direct “Hell’s Angels,” a war epic that was at the time the most expensive movie ever filmed. Though Hughes is a success in Hollywood, he moves on to the aviation industry, building planes for the Air Force during World War II, then buying Transcontinental and Western Airlines. The first hour of the film, which chronicles Hughes’ rise to fame and power, is a pure pleasure to watch.

The second half focuses on Hughes’ confrontations with Pan Am president Juan Trippe (Alec Baldwin) and the government’s efforts to stop TWA from expanding internationally. Most devastating are FBI investigations into Hughes’ activities during World War II, headed by the corrupt Sen. Brewster (a delightful scene-stealing Alan Alda).

DiCaprio inhabits Hughes effortlessly, depicting his illness sensitively and realistically. The extraordinary performance proves that he has matured into one of the most talented actors in Hollywood.

Hughes was also famous for romancing several famous women, and John Logan’s script has wisely chosen to focus on Katharine Hepburn, played by Cate Blanchett in a deliciously over-the-top recreation. Her performance is so charismatic that when she leaves Hughes for Spencer Tracy, there is a void in the film that slows down its second hour.

Hughes died in 1976, alone and broken down by the paranoia and obsessive-compulsive disorders that had haunted him throughout his life. Though the film doesn’t follow Hughes to his dismal end, the intrusiveness of his mental illness is blatant. In one wrenching scene, Hughes — hounded by the FBI, and despairing that TWA is doomed — locks himself within a screening room for days. He eventually returns to apparent normalcy, but the film is affectingly realistic about its hero, instead of mindlessly sentimental.

“The Aviator” is certainly an unsettling and challenging piece of filmmaking that does not shy away from difficulty — but its ultimate effect is to celebrate Hughes’ achievements, the power of human creativity and the promise of the future. Its message is mostly optimistic, which stands in stark a contrast to the existential grittiness and relentless pessimism of Scorsese’s earlier work.

As can be expected from any work of its ambition and sheer size, there are problems with the film. Logan’s script is inevitably a condensed and somewhat whitewashed account of Hughes; His anti-Semitism, racism and involvement in weeding out Communists in Hollywood during the Red Scare of the 1950s are merely hinted at. More problematically, the film strives for pat explanations in situations that deserve a subtler treatment. Though a biographical film does not need to explain every aspect of its subject’s life, “The Aviator” seems to want to do so.

Nevertheless, it is a terrific achievement. The film is arguably the most accessible of Scorsese’s career, and it takes a significantly more positive and inspiring view of human nature than most of his work. The cynic would argue that Scorsese is doing nothing more than Oscar-hunting. But if the director wins the Academy Award for this film, which he very well may, it will be because he truly deserves it.