Pablo Picasso's celebrated painting "Guernica" is to be moved from New York's Museum of Modern Art to Madrid's Prado in 1981, officials said in New York yesterday.

The agreement reached in Madrid on Thursday between Picasso's executor, French lawyer Roland Dumas, and Spain's Premier Adolfo Suarez would appear to end the disposition question that has remained unresolved since "Guernica" was painted as an anti-Franco protest in 1937.

The 11-by-25-foot canvas portrays the distruction on April 26, 1937 of a small Basque village under seige by Franco forces as Spanish Republican troops retreated before the superior strength of the attackers.

At the time it was believed the town's ruin was the first example of modern terror bombing, in which Nazi planes supporting Franco wiped out the village for no particular military purpose. Through this view has been called into doubt by some recent scholarship, it was on that assumption that Picasso painted.

It is ironic that "Guernica," one of the most nationalistic of works, has never been exhibited in Spain. It was first exhibited in Paris in 1938, and was put on indefinite loan to the New York museum the following year. Picasso directed that the painting should stay there until democracy was firmly reestablished in Spain, at which time it would go there as the property of the Spanish people.

This change began with Franco's death in 1975, two years after Picasso's, but the democratic elections of 1977 seemed to be the turning point that lead to Thursday's agreement.

Reached yesterday on vacation in the south of france, the Museum of Modern Art's director of the department of painting and sculpture, William Rubin, described the work as "the greatest of the 20th century." He also noted a document drafted in 1977 in which the museum and the executor spelled out terms of an eventual transfer.

In it attorney Dumas notes that Picasso "spoke to me numerous times about this anguishing subject. His preoccupation with "Guernica' took precedence over everything else with him. He furnished proof of this by agreeing to make arrangements in writing, which he had not done for any other problem in either his succesion or his work.

"the fragility of the painting," the document continues, "precludes any further travel after its installation in Mardrid" at the Prado, Spain's principal gallery and the home of much of the finest of Spanish painting -- including much of the best of Goya, Velesquez and El Greco.

The agreement with the premier on Thursday was verbal, and technical details must be put into writing. Preparatory drawings for "Guernica" will accompany the painting to Spain.

Even without "guernica" the New York gallery will have what most experts regard as the most comprehensive of all collections of Picasso's major works. The 1museum of Modern Art will hold a major retrospective of Picasso's next year to mark the 100th anniversary of his birth. CAPTION: Picture, "Guernica"