A D.C. Superior Court judge has ordered the Smithsonian Institution to return two paintings -- one of them a 19th century landscape currently in vogue that is valued at up to $500,000 -- to the estate of Washington social figure Therese Davis McCagg, who lent the two paintings to the Smithsonian more than 60 years ago.

The paintings have now become the center of a protracted legal wrangle in the high stakes market of American fine art. They were lent in 1917 and left unclaimed by her family after her death in 1932 until a New York art dealer discovered them here in 1978.

Judge Margaret A. Haywood over ruled Smithsonian contentions that a three-year limit on personal property loans should be imposed on the McCagg family and that the time started from McCagg's death in 1932.

"The demand for return of the paintings was made within a reasonable time after the [estate] administrator . . . became aware of them as claimed assets of the estate," Haywood said in her three-page order issued last week.

Smithsonian officials said they are studying the order and have not decided whether to appeal it.

The two paintings at issue are a 3-by-2-foot oil canvas called "South American Landscape" by the prominent 19th century American artist Frederic Edwin Church and a slightly larger oil painting called "Mountain Scene" by a 19th century Swiss artist, Francois Diday.

According to papers filed in the case, a court-appointed appraiser valued the Church painting at $160,000 and the Diday at $45,000. But some attorneys in the case say the Church painting could sell for up to $500,000 at auction.

In October 1979, a much larger Church painting entitled "Icebergs" sold at a New York auction for $2.5 million, a record at the time.

Church and other members of the Hudson River School of romantic landscape artists in the last century have enjoyed a revival in recent years, gaining increasingly higher prices among art dealers and collectors for their canvases.

And that is how Church's "South American Landscape," exhibited at the Smithsonian's National Museum of American Art at Eight and G streets NW, became the focus of a legal fight here.

The heirs to the McCagg estate, now scattered to other cities, apparently were unaware that Therese McCagg had lent the Church and Diday paintings. No reference was made to the paintings in her will when it was probated in 1932, according to court papers.

In 1978, according to Nathaniel Bickford, one of the attorneys in the case, New York art dealer James Maroney was in Washington touring the National Museum of American Art and by chance noticed Church's landscape with a plaque next to it that said "L. 1917" -- meaning it had been on loan since 1917.

"That seemed to him to be a very old loan," Bickford said in a telephone interview. "He was curious." After further research of Smithsonian records, he found that Therese McCagg had died in 1932 and the painting had gone unclaimed by her family.

"It was just one of those serendipitous things," said Bickford. Aware of the spiraling value of Church's paintings, Maroney engaged Bickford to find the McCagg heirs to see if they wanted to get back the painting (and also the Diday canvas) from the Smithsonian and then sell them. Maroney would get a 12 1/2 percent finder's fee for his effort, Bickford said.

More than a dozen heirs showed interest, Bickford said. The Smithsonian balked, however, contending the estate had lost its claim three years after Therese McCagg's death.

Judge Haywood has now ruled in favor of the estate. In the meantime, while the Smithsonian ponders a possible appeal. Church's landscape remains on exhibit in the National Museum of American Art. The Diday is in storage. CAPTION: Picture 1, "South American Landscape" by Frederic E. Church, valued at up to $500,000, is hanging in National Museum of American Art. By James M. Thresher -- The Washington Post; Picture 2, Museum plaque next to disputed painting indicates it has been on loan since 1917.; Picture 3, Frederic Edwin Church, 19th century artist whose paintings are again in vogue.