WASHINGTON (AP) _ Frustrated by Ulysses S. Grant's refusal to pose for a portrait, a Swiss artist commissioned to glorify the Union triumph in the Civil War decided instead to paint Grant's old nemesis, Robert E. Lee, in a daring gesture of spite.

The long-forgotten oil painting by flamboyant artist Frank Buchser spent the next 120 years gathering dust in a museum in his native Switzerland - until it was found by Swiss Ambassador Edouard Brunner and brought back to the United States last year.

Tonight, on the 184th anniversary of Lee's birth, Brunner will unveil the newly restored portrait of the Confederate general at an embassy reception attended by alumni of Washington and Lee University in Lexington, Va.

Lee was president of Washington College in Lexington for five years after his April 9, 1865, surrender to Grant at Appomattox ended the Civil War. The institution was renamed in Lee's honor after his death in 1870.

Brunner obtained the portrait on permanent loan from the Swiss National Museum in Bern to the embassy in Washington. It is the last portrait of Lee to be painted from life, and one of only three for which Lee ever posed.

Lee, who rarely consented to pose even for photographers, relented to the charming Buchser's entreaties. He sat for the painter for three weeks in the fall of 1869, about a year before he died.

Lee refused to wear his old Confederate commander-in-chief's uniform, saying ''I am a soldier no longer,'' and posed instead in the black broadcloth suit he had worn at his son's wedding.

Buchser, however, persuaded Lee to sit next to a table where the artist had arranged the former general's hat, binoculars, and the sword, belt, sash and uniform coat that Lee had worn at Appomattox.

Buchser had been commissioned by a group of Swiss liberals who admired the Union cause in the Civil War and wanted portraits of Northern heroes, including Grant, to hang in the Swiss parliament in Bern.

When Grant repeatedly refused to pose, Buchser painted Lee's portrait in the hope he could persuade Grant to change his mind. Grant never consented, but the Lee painting - though unpopular with Buchser's patrons who refused to pay for it - came to be regarded as Buchser's finest portrait and went on permanent display at the Bern museum.

A known brawler and womanizer who sported a 12-inch waxed mustache, Buchser arrived in Lexington unannounced, but quickly won Lee's confidence and captivated his wife and daughters with his hand-kissing European manners and his lively performances on the guitar and piano.

Buchser soon embraced Lee as a father figure. ''What a gentle, noble soul, how kind and charming the old white-haired warrior is,'' the artist wrote in his diary.

When he returned to Europe, Buchser declared that Lee was ''the ideal of American democracy.'' The artist even grew a beard and trimmed his mustache to look like Lee.

During their hours together, Lee shared his private thoughts with Buchser in a way he rarely did with others.

According to the artist's diary, Lee praised former Confederate president Jefferson Davis for his character but called him ''one of the extremest politicians.'' Lee also made unflattering comments about Grant's skills as a military tactician.

One of the two other life portraits of Lee was painted by an obscure artist in 1833 when Lee was a young, mutton-chopped lieutenant with the U.S. Army engineers. It hangs in the crypt of Lee Chapel on the W&L campus where Lee is buried.

The other portrait, painted in 1853 by another little-known artist, shows Lee as superintendent of the U.S. Military Academy at West Point, N.Y. That painting hangs in the home of Lee's granddaughter, Mrs. William Hunter de Butts, in Upperville, Va.

Brunner said he brought the Lee portrait to Washington to join another Buchser portrait of Union Gen. William Tecumseh Sherman at the ambassador's residence here. Both belong to the Swiss government, he said, and will remain at the embassy.