After several years of negotiations $4,875,000 and a lengthy and occasionally vitriolic public battle between obstreperous big mouths in Boston and extremely dignified officials in Washington, George and Martha Washington are finally getting ready to begin their three-year visit to the National Portrait Gallery.

The two famous Gilbert Stuart portraits, which gallery director Marvin Sadik calls "the two most important American pictures," second in historical value only to the Declaration of Independence and the Constitution, will be available for public viewing July 4. Under the agreement worked out with the Boston Athenaeum, which owned and sold the pictures, and the Boston Museum of Fine Arts, which has had them on display since 1876, the portraits will stay here for three years. Then they're supposed to go back to Boston for three years.

"In three years we put our gunners on the roof and rattlesnakes around the paintings, and if they want to try to come and get 'em they can," Sadik said yesterday during a viewing for the press in the gallery's restoration studio.

The paintings arrived in Washington May 2, flown here by a chartered Lear jet at a cost of $3,000. "It was the quickest way to get them here," Sadik explained. "Trucks always break down, and the railroad is always late, and regular jets hit the ground too hard."

Sadik met the plane with an armored car, escorted front and back by both metropolitan and private police cars. The pictures have been spending their days in the restoration studio since coming to Washington, and their nights in a vault. Part of the preparations include outfitting them with bulletproof Lexan glass and installing an elaborate wiring system that will trigger all sorts of alarms if anyone comes near them. There is also a human guard near them at all times.

"You have to prevent a screwball from doing something crazy," Sadik said. "Somebody might decide to finish the paintings."

The paintings are, in fact, unfinished. Stuart intended them to be life portraits from which he painted the numerous other Washington likeness (there are no other known portraits of Martha). According to a letter Washington wrote Stuart, he sat for the picture on April 12, 1796, three years before his death, and stuart probably did Martha's the same day.

"He may have kept them unfinished so that no one would buy them from him," Sadik said. After Stuart's death in 1828, his wife and daughter gave them to the Boston Athenaeum in 1931, which in turn loaned them to the Boston Museum of Fine Arts. Sadik began negotiting to buy them in early 1978. Over a year later some well-known citizens of Boston, including Mayor Kevin White and Sen. Edward M. Kennedy, decided that the prospect of the Stuart portraits moving to Washington was too awful to bear, and launced a fund-raising campaign aimed at raising $5 million.

In the course of the outcry White compared Sadik to Hitler's sidekick Hermann Goering, sneering that the city of Washington has no culture and therefore has to buy it, and then filed a suit to stop the sale. Kennedy weighed in with an emotional plea to keep the pair in Boston, recalling how he first saw the pictures sitting on his grandfather's shoulders "looking straight into the eyes of President Washington and savoring tales I was being told."

Eventually the joint custody arrangement was worked out, with both museums chipping and agreeing to the three-year alternate residency. Residents of both cities have visitation rights in the other.

The portrait gallery, however, undertook the restoration and reframing. The Boston frames were not of the 1796 period but rather from about 1831, so Sadik and his staff commissioned custom-made frames at a cost of $3,600 from a firm in New York, after studying frames in London and this country to find the correct carved and gilded model. The frames have been painted with both water and oil gilt, primed with both red and blue gesso to reproduce the precisely right shade of gold.

Chief conservator Felrath Hines has been sprucing up the portraits, first by cleaning off the grime and varnish with cotton pads soaked n distilled water, removing the old canas linen lining and the glue that held it on, and then sealing on a new lining. The new lining is attached through a special adhesive applied on a "hot table" for about 35 minutes and then cooled under pressure for several hours. Then the portaits are placed in a custom-made stretcher in which they remain. "The idea is to make them as stable as possible," Hines said.

While Martha's portrait shows her as a slightly plump, gray-haired matron, with a slight smile, General George looks rather grim, with pursed lips and what the museum describes "the gravity of [his] expression," reflecting "the state of his mind at that time."

In a letter to John Jay written shortly after the portrait was painted, cited in the material the museum gave to the press, Washington is filled with "much concern" and "serious anxiety" over "some parts of the Union, where the sentiments of their leaders and adverse to the Government, and great pains are taken to inculcate a belief that their rights are assailed, and their liberties endangered . . ."

Washington, soon to retire from the presidency, also wrote in his diary a rather sad and somewhat grumpy complaint that he was being maligned. "Although he is soon to become a private citizen," he wrote, "his opinions are knocked down, and his character reduced as low as they are capable of sinking it."

Welcome to Washington, General Washington.