How smart was Andy Warhol? Smarter than he looked, smarter than he claimed to be, and smart enough to remain fascinating, frustrating and even infuriating almost a quarter-century after his death.

Warhol: Headlines,” which opens at the National Gallery of Art on Sunday, is the museum’s first major exhibition devoted to the artist. It leaves no doubt about the curator’s point of view: Warhol was no irony-soaked provocateur mindlessly importing pop pizzazz into the sanctums of high art for pure shock value. He was strategic, intelligent and brilliantly adept at analyzing and indicting the world we live in today, a world he seemed to both predict and forge through games of representation we now know by the encompassing shorthand: Warholian.

As if to second that opinion, the Hirshhorn is also opening a major exhibition, “Andy Warhol: Shadows,” the first complete installation of a 102-part work that occupies almost an entire floor of the museum. The 1978-79 series, laid out in one long, almost 450-foot ribbon of color, repeats with subtle and sometimes radical variations a single, abstract design supposedly based on a photograph of a shadow. It shows Warhol covering his high-art flank, assuming the prerogatives, including the megalomaniac ambition of the artist with a capital A that he consistently claimed never to be.

Taken together, the two exhibitions might remove any lingering doubts about Warhol. But the paradox of Warhol is that even as you become convinced, yet again, that he was indisputably great, Warhol himself disputes your opinion. His most enduring artistic act may be that he will never let his own greatness rest as settled fact. His consistent, unbroken insistence that he was naïve, superficial, an intellectual void, a cynic with his eyes focused only on dollar signs, undermines his oeuvre from beyond the grave, in a maddening but brilliant final joke on the very idea of posthumous relevance.

The National Gallery survey focuses on works Warhol made in response to, or using visual elements of the news, from early, hand-sketched mock-ups of newspaper front pages in the late 1950s to the enormous 1981 triptych “Fate Presto,” three heroically scaled silk screens seen for the first time in the United States.

If the early newspaper drawings feel a bit sophomoric — they are filled with misspellings and rendered in what curator Molly Donovan argues is an intentionally rough style — the “Fate Presto” panels, by their size and somber, black-and-white palette, have an almost sacred seriousness. They reproduce the front page of an Italian newspaper as it cries out “Hurry Up,” a plaintive cry for relief for victims of a devastating earthquake. One panel is rendered in straightforward black and white, a second is almost all white, the third almost all black. Late in his career, after recycling tabloid inanities as high art, Warhol seems sobered by the actual news in a newspaper. He is earnest, even somber, acknowledging in one panel that the news can be so glaringly urgent that it is blinding, and in another so impenetrably sad that it threatens the mind like a black hole.

The exhibition also includes videos, television projects and “screen tests,” films of minor art world celebrities caught apparently unawares, reading the newspaper. It follows Warhol’s career from beginning to end, including his own appearance in the headlines after being shot by an addled groupie in 1968, and again in 1987 when he died too young at 59, on the cusp of a new age of virtual news and electronic communication. It is a powerful, synoptic view of the artist’s career, but also focused enough that Warhol’s prolific and sometimes too-protean production never overwhelms.

It outlines, clearly and coherently, the basic, shifting moves of the Warholian aesthetic. In the first room, two side-by-side paintings from 1961-62 are both based on the same front page of the New York Post, announcing on November 3, 1961, that Princess Margaret of Great Britain had produced male issue. But the two “A Boy for Meg” panels are markedly different. One reproduces quite precisely the original newspaper page, as it appears in a nearby glass case; the other is sketchier, with the headlines left incomplete, or perhaps rubbed out or erased, in a deliberate effort produce a self-consciously ghostly, or “artsy” rendition.

The pairing reproduces the basic outlines of a classic anecdote from Warhol’s 1960 autobiographical work, “Popism: The Warhol Sixties,” in which the artist recounts how he once showed a close friend two paintings of a Coke bottle, one done with abstract flourishes, the other “just a stark, outlined Coke bottle in black and white.” He let his friend decide between the two, and the response was adamant: the stark, clean, seemingly exact copy of the bottle, its trademark shape and logo, was far better. Forget the artsy details, go with the commercial art clarity.

There is a double erasure in this anecdote. Warhol shifts a fundamental aesthetic choice away from himself, as if he decided to be a pop artist because someone else told him to go that direction. And he underscores a deeper paradox also present in the “A Boy for Meg” paintings: There is actually less of the real Warhol present in the painting that seems to bear more traces of an artist crafting, smudging and manipulating his material. The erasure that defines Warhol is the more complete erasure of his presence in the painting that seems to be merely a copy of the original.

That basic game sets the stage for the rest of the show, throughout which the visitor is constantly invited to fill in the details that Warhol claims aren’t there. “I’m going to look into the mirror and see nothing,” Warhol once said. “People are always calling me a mirror, and if a mirror looks into a mirror, what is there to see?” This is Warhol in his teasing mode, but also remarkably astute about how his work never seems to take a definitive stance.

Certainly there’s some kind of political commentary lurking in a portfolio of silkscreens and text he created in 1968, in response to the assassination of John F. Kennedy. “Flash — November 22, 1963” uses a reproduction of the news bulletins from just before the shooting through the funeral of Lee Harvey Oswald three days later. The news is shown as an accumulation, seemingly in real-time, of ever more horrifying details. The words are printed on wrappers that contain silk screen images, which maintain a scrupulous inscrutability about Warhol’s real feelings. In one case he reproduces an advertisement for an Italian carbine, a gun on sale for $12.78. In another he superimposes a movie clap-board over the face of Kennedy, as if to underline his own fatigue with the collective emotion and drama that surrounded the death of the president.

Donovan ends the exhibition with a brilliant flourish, a series of images made in 1985 (some of them collaborations with Keith Haring) that riff off a New York Post headline: “Madonna: ‘I’m not ashamed.’ ” The Post was gleefully on the warpath after nude photographs of the pop star surfaced, to which Madonna replied: So what?

The manipulation of the front page shows more of Warhol’s hand than many of the other more reticent images. It also mixes the openly gay Haring’s painted additions with the frank declaration of “I’m Not Ashamed,” which may in turn be Warhol’s comment on his own sexuality, which was a tragic mix of the overt and the uptight. But mostly it raises the question of shame, whether Warhol was indicting the shameless trivialization of culture, or shamelessly pushing the bar ever lower. Is it possible to do both?

A text panel near the opening of the Hirshhorn’s “Andy Warhol: Shadows” only continues the ambiguities. Of this enormous installation, he says: “Someone asked me if I thought they were art and I said no. You see, the opening party had a disco. I guess that makes them disco décor.” At the end of the same passage, however, he says offhand, “I always like to see if the art across the street is better than mine.” A small acknowledgment that of course he was making art, he was ferociously competitive and ambitious as an artist, and he knew that the value of his art was based on elaborate intellectual games, including the denial that it was art.

Donovan, the curator of the National Gallery show, says the proof is always in the work itself. And “Shadows” is a stunning work, a serial summation of the possibilities present in abstract painting. It would be too generous to compare it to Bach’s Goldberg Variations, but the ambition is similar, a summation of all the possibilities that can be wrung out of a simple idea, exhausting and exalting them in the process. Panel by panel, you think of names in circulation when Warhol made the series. Thick green paint drawn with a mop suggests Roy Lichtenstein, mocking abstraction with his own pop art reference to paint oozing off a brush. Others suggest skin tones, or military olive drab, or the color juxtapositions of Josef Albers, or the black-on-black anguish of darker expressionists.

The whole cycle is so long that you feel sometimes like you’re taking a walk outdoors, waiting to round the bend of a hill and see if all the tiresomely repetitive beauty continues ever same. And there is also something aggressive about it, childish almost, as if the artist set out to lick every dinner plate at an enormous banquet table, to claim every spot for himself.

The two shows are a boon to have in one spot at the same time. Before seeing the Hirshhorn exhibition, it’s worth committing one detail from the National Gallery to your mental memory. In the lower left of the image reproduced in the newspaper painting “129 Die in Jet,” made in 1962, is a beautifully painted area that plays with the blurriness of the original image, which would have been transmitted to the New York Mirror electronically, with subsequent loss of detail and distortion. Warhol finds a wealth of purely abstract beauty in this little patch of paint. It is also eerily reminiscent of many areas of the much later and very different “Shadows,” where the same gestures feel a bit like a character retrieved by a novelist many hundreds of pages after the reader lost track of him in the accumulation of narrative and detail. It is a reminder of the steady hand and persistence of vision that traces through Warhol’s oversized oeuvre with frightening clarity.

Warhol: Headlines

Until Jan. 2 at the National Gallery of Art. 202-737-4215.

Andy Warhol: Shadows

Through Jan. 15 at the Hirshhorn Museum and Sculpture Garden. 202-633-1000.