The Smithsonian Institution's National Portrait Gallery may succeed in buying Gilbert Stuart's portraits of George and Martha Washington-but not without a fight.

Boston's Mayor Kevin H. White pledged yesterday that he would sue to stop the $5 million sale.

The planned transaction between the Boston Athenaeum, a private library that badly needs cash, and the Smithsonian, which dearly wants the pictures, is comparable to "the Louvre trying to sell the Mona Lisa to the Arabs," White said.

Since George Washington sat for Stuart in 1796, the unfinished portrait often has been reproduced, first by Stuart, who made about 50 replicas, and later by engravers who designed the dollar bill. Martha Washington's similarly unfinished portrait also was done from life.

White called the paintings "our most prized cultural and historical treasures." Marvin Sadik, director of the National Portrait Gallery, described "these spectacular pictures" as "the greatest of all American historical portraits."

If the sale is completed, the paintings will become the most expensive ever done in this country. Two other American paintings, abstractions dripped and splattered by the late Jackson Pollock, have fetched comparable sums. One went to Australia and the other to the National Gallery of Art for $2 million apiece.

Calling for "a new crusade," the Boston Globe joined White in the save-the-Stuarts outcry. In an editorial headlined "Keep the Washingtons in Boston," the newspaper observed, "We just can't afford to let his paintings go."

Although there is no doubt that the artist's widow, and his daughter, Jane, sold the Stuart portraits for $1,500 to the Athenaeum in 1831, the library's right to sell them must be decided by Massachusetts courts.

"The reason I'm involved," said Thomas R. Kiley, first assistant attorny general of the Commonealth of Massachusetts, "is that when the Athenaeum bought them in 1831, more than half the purchase funds came from a sort of public trust."

Athenaeum treasurer Augustus Peabody Loring further explained:

"In 1808 or 1809, a group of Boston gentleman decided to erect a marble statue to Father George. Though the War of 1812 delayed them, by the 1820s they had managed to come up with $15,000. They spent it on their statue, and when they'd paid their bills they discovered they had $800 left over.

"When 1831 rolled around, they agreed to spend that money on the Stuart portraits. Fourteen public-spirited subscribers raised the other $700. They put up $50 each," Loring said.

In Massachusetts, Kiley said, the attorney general administraters public charities and public trusts.

"There will be court involvement. I am sure of that. I know the ball is in my court. But I'm not ready to return it yet," he added.

White said he intends to fight the sale on three fronts:

Legal-he has told the Boston corporation counsel to initiate a lawsuit.

Financial-he plans to seek funds for the Athenaeum "to eliminate the financial necessity for this transaction."

Moral outrage-"I am here right now to announce that we will not tolerate the sale of part of this city's birthright," he said.

Sadik, the Portrait Gallery's director, sees the situation differently.

"If the nation is to have a National Portrait Gallery worthy of this country, these sacred items belong here. The declaration of Independence and the Constitution are just two blocks away in the National Archives. The Stuart portraits, in all honor, belong in this gallery-nowhere else," he said.

Sadik and Charles Blitzer, the Smithsonian's assistant secretary for history and art, have been negotiating for 14 months to purchase the Stuart paintings.

Also involved in the dispute is the Boston Museum of Fine Arts where the paintings are on loan and have been displayed since 1876.

In 1974, when the Athenaeum decided to raise funds by selling art, it offered first refusal on the works in its collection to the Museum of Fine Arts. The Museum bought for $1.2 million several works, among them ironically a portrait of Gilbert Stuart painted by John Neagle. "We took no steps to buy the Stuart Washingtons at that time," said Howard Johnson, the museum's president.

"They were offered them for $1.5 million. They turned the offer down." Sadik said.

"I have faith that the courts and the attorney general will uphold the interests of the people of Massachusetts," said Theodore Stebbins, the Fine Arts museum's curator of American paintings who objects to the sale. "If they don't, I'd hope the museum would think very hard about execising its option to buy them."

"The Boston Musuem of Fine Arts no longer has an option to buy. It's lapsed. For months they've been aware of our negotiations. We didn't go behind their backs." Sadik said.

Blitzer of the Smithsonian agrees. "I want to emphazize that there have been tripartite negotiations-among the Smithsonian, the Athenaeum and the Boston' Museum-right from the beginning," he said.

"Originally," Museum president Johnson said, "we hoped we'd be able to borrow the portraits back, for display in Boston, for one year out of three in perpetuity." Sadik said it was eventually agreed that the Stuarts would go back to Massachusetts for one year in five, for the next 50 years.

Johnson said the one-year-in-five proposal will be placed before his museum's board April 19. "I believe our option to buy the Stuarts is still in effect," he said. "But we're in the middle of a $21.5-million fund drive to climate control our building, and I don't see how we can raise an additional $5 million. We don't have that king of money."

The Smithsonian apparently does. Its monies come from Congress, private donors and income on investments, shop sales, its magazine and other sources.

Blitzer, who has been summoned to Boston to meet with Mayor White Monday, said no congressionally appropriated funds will be used to buy the Stuarts. CAPTION: Pictures 1 and 2, Details of the Gilbert Stuart portraits of Martha and George Washington. AP