The painter Marc Chagall was a juggler of memories. Artists in great age often spend their days in reverie, but Chagall -- who died yesterday at 97 in his home at St. Paul de Vence on the French Riviera -- had been dreaming of his own past, and of that of Russian Jewry, since he first turned to art.

He was a modernist rememberer. His style is unmistakable. What the Cubists did to space, Chagall did to gravity. His blue cows and old rabbis, his acrobats and lovers, leave the earth at will. They levitate with joy.

"When I saw a Jew walk on his feet, for me he walked on his head," said Chagall. "I look at things, and then a dybbuk gets inside me. I am a little meshuga. That is my normal state."

His art is uneven. It is often very beautiful but occasionally inane. What never falters is its warmth. Chagall was never analytical or coolly scientific. It is difficult to name his most important pictures. It is that flow, that stream of memories, that weightless drift of images -- rather than particular masterworks -- that come to mind when one recalls his art. He blended in his finest work whimsy and deep mourning, clumsiness and grace.

"With Chagall alone," wrote surrealist Andre' Breton, "the metaphor made its triumphal entry into modern painting."

History -- and Hitler -- have given to his pictures a special poignance. Almost all his works of art -- his topsy-turvy oils, his etchings and drawings and his glowing stained-glass windows -- are memorials to the Jews of Europe, to a world now lost.

He was perhaps the last major painter of his generation. Only Salvador Dali, another obsessional dreamer, has managed to outlive him. Both men in recent years, though often discussed in college lecture halls, have been infrequently exhibited -- and occasionally scorned.

Chagall was born July 7, 1887, in the Russian ghetto of Vitebsk, "the sad and joyful city" whose wooden houses, muddy streets, smiling cows and trembling lovers he painted all his life.

His father, a poor warehouseman, came home each night exhausted after spending all day rolling heavy barrels of smoked herring. Chagall's family was large. He had one brother and eight sisters. Like his family, his neighbors were devout. His childhood -- and afterwards his reveries -- were filled with Jewish rituals, feasts and fasts, and prayers.

The fiddler on the roof -- not the Broadway show, but the one that Chagall painted first in 1908 -- was his own Uncle Neuch. Whether Neuch actually fiddled on the roof is a matter of conjecture, but he did play the violin ("like a shoemaker," said the painter) and he was once discovered sitting on his roof. Chagall, in his art, blended recollections as we do in dreams.

Fiddling on the roof, or painting fish with wings of fire, might seem to sterner folk irrational behavior. But not to Chagall. The painter and his people all were Hasidim.

They were followers of Baal Shem Tov, the 18th-century Jewish mystic, who taught that the expression of spontaneous emotion was as sure a sign of holiness as was dry obedience to the Law. The Hasidim were known for their indulgence in "all sorts of public nonsense." They turned "somersaults in the marketplace," believed in prophecies and miracles, and condemned pious sadness as "a darkening of the soul." That heritage, that playfulness, is apparent in his art.

Unlike other innovative painters of the first years of our century, Picasso, for example, Chagall never had to free himself from the measured space and painstaking brushwork of academic painting. He was joyous from the start. Nor was he ever tempted, as were Kasimir Malevich and other Russian modernists, by the intellectual austerities of wholly abstract art.

He showed his talent early. As a child he drew constantly. Although the role of painter was not then a calling sanctioned by the Orthodox, Chagall traveled to St. Petersburg in 1907 to try to gain admission to the Imperial School of Fine Arts.

He failed his exam. Chagall had only 27 rubles, and for the next two years he scuffled, sometimes working as a servant, sometimes painting signs. It was in St. Petersburg, at the school of Le'on Bakst, that Chagall was given his first inkling of the new French art. By the standards of the time, Bakst was a progressive. He had designed sets for Diaghilev. Because he spoke approvingly of Gauguin, van Gogh and Ce'zanne, the esthetes of St. Petersburg regarded his small art school as a "window on Paris."

Chagall applied and was admitted. (Among his classmates his first day there were Nijinsky, the dancer, and the Countess Tolstoy.) But Bakst's art was rather modish, perhaps overstylized, and his teachings didn't take. But then Chagall got lucky. He found himself a champion, a St. Petersburg attorney, who began to buy his art.

"Vitebsk, I'm deserting you, I'm leaving you to your smoked herrings," said the painter. In 1910, with a stipend from his patron, Chagall set off for Paris. The train trip took four days.

On his second day in Paris, Chagall paid a visit to the Salon des Inde'pendants. "I penetrated to the heart of French painting of 1910. I hooked myself there," he said.

Soon he found a studio in the building called La Ruche. "This was a curious beehive-like structure in a garden near the Abattoirs de Vaugirad built by the sculptor Boucher, a descendant of the 18th century painter, from lumber salvaged from the demolition of one of the Paris expositions," wrote James Johnson Sweeney. "It comprised about two dozen wedge-shaped studios, twelve on the ground floor for sculptors, twelve for painters on the floor above. Modigliani had the studio next to Chagall's. Le'ger, Soutine, and others were on the landing."

The paintings of the Fauves (and perhaps the light of Paris) soon helped the young Chagall liberate his color. The example of Henri Rousseau, that much admired innocent, may have reinforced his trust in the whimsical and childlike spirit of his painting. He learned, too, from the Cubists and from the structured hues of Robert Delaunay.

But although he allied himself with the new art of Paris, his pictures differed greatly from those made by his colleagues. Chagall's images told stories. The joy with which he reintroduced story line and narrative into modern painting is his chief contribution to School of Paris art. He would never be forgiven by the most austere of the critics, who condemned his floating goats, samovars and soldiers as too close to "literature."

The poets of the city, rather than its painters, were the first to recognize the power of his art.

Guillaume Apollinaire, on glimpsing a Chagall, called it "supernatural." (Apollinaire did not coin the word "Surrealism" until the end of World War I). Blaise Cendrars, the poet, wrote a portrait of the artist:

He's asleep

He's awake.

Right away he's painting

He grabs a church and paints with the church

He grabs a cow and paints with a cow . . .

With all the dirty passions of a little Jewish town

With all the exacerbated sexuality of provincial Russia

For France . . .

Chagall painted for four years in Paris until, in 1914, he traveled to Berlin for his first one-man show. From there, as World War I began, he went home to Vitebsk, where, during the Revolution, he was appointed the town's commissar of fine arts.

The art school he established there was committed to the new. As teachers he employed Malevich, El Lissitzsky and other modern painters. Imbued with his own sort of revolutionary fervor, Commissar Chagall decided it was time to beautify his town.

"When government officials came down to Vitebsk to see how things were shaping up," writes Lionello Venturi, "they found the city decorated not with portraits of Marx and Lenin, but with cows and horses flying through the air."

In 1922, after hearing from a German friend -- "Are you alive? The story goes you were killed in the war. Do you know you are famous here? Your pictures have created expressionism. They sell very high." -- Chagall received an exit visa and left Russia for Berlin. In 1923, at the invitation of Ambroise Vollard, the famous dealer, Chagall returned to Paris. Now he was a figure in the art world.

Chagall's first retrospective opened in Paris in 1924. His second was held in Basel in 1933. His style, once quite rough and and tart, had grown increasingly romantic -- and popular as well. His love of popularity was perhaps his greatest flaw. In photographs he sometimes seemed the Harpo Marx of art. Chagall made funny faces, and funny pictures, and his silliness (much less magical than Harpo's) as well as his excessive sweetness, sometimes undercut the power of his late art.

But still his public forgave him. Chagall won the first prize at the Carnegie International, Pittsburgh, in 1939. Many other honors followed.

In 1941, no longer safe in Europe, he came to this country at the invitation of the Museum of Modern Art. His boat docked in New York on June 23, the day after the Germans marched into Russia. Vitebsk, a few weeks later, was invaded and destroyed.

In 1945, before moving back to France, he designed the sets and costumes for Stravinsky's "Firebird" (choreographed by George Balanchine). Large Chagall exhibits were held in 1946-47 in New York, Chicago, Paris, Amsterdam and London. In 1948 he won a first prize at the Venice Biennale.

Chagall, by now wealthy, soon bought a villa in the south of France, near St. Paul de Vence, where he began to do ceramics -- a move, or so it was said, that much annoyed Picasso, who saw the medium as his own. In the '50s and the '60s, Chagall was given numerous large-scale commissions, of which the most impressive is a set of stained-glass windows for the Hadassah-Hebrew University Medical Center in Jerusalem. The 12 windows, one for each of the Twelve Tribes of Israel, were exhibited in Paris and New York in 1962. In 1973, a small Chagall museum was opened near his Riviera home.

Chicago gave him a number of public commissions, one a stained-glass window that was dedicated to the late mayor Richard J. Daley and unveiled in August 1977, at the Art Institute of Chicago.

It has been nearly 40 years since Chagall has been given a major exhibition in this country. But coincidentally, on Wednesday, the Philadelphia Museum of Art announced that the large Chagall retrospective, now at the Royal Academy in London, will be seen in Philadelphia from May 12 through July 7.

His refusal of pure abstraction may have cost him a measure of critical acclaim. But free, obsessive figuration is once again in fashion. This summer's retrospective may revivify his reputation. Chagall, a modernist when young, may have managed to live long enough to become a modernist again.