New York's Museum of Modern Art at long last has relinquished Pablo Picasso's "Guernica."

The 25-foot mural, which the painter loaned to the museum in 1939, has been dismounted, rolled, packed -- and shipped off to Spain. It will be installed permanently near the Prado in Madrid, in time for the Oct. 25 centennial of the late Spaniard's birth.

On April 26, 1937, Guernica, a small Basque city, was bombed by the German Condor Squadron. Picasso, who had been asked by the Spanish Republican Government to provide a mural for the Spanish Pavilion of the 1937 Paris International Exposition, took the attack as his theme. He completed "Guernica" between May 1 and June 4 in a burst of grief and anti-Franco rage.

Though his art was filled with Spanish themes, with bullfights and dark beauties, Picasso refused to visit his beloved Spain as long as Francisco Franco ruled. Picasso died in 1973 at the age of 91. Although he had often spoken of giving "Guernica" to Spain, he vowed it would remain abroad until he, or his designated attorney, officially determined "that certain conditions in Spain had changed." The museum said yesterday that that crucial determination was made in August by attorney Roland Dumas. Negotiations between the museum and the Spanish government were completed Tuesday.

The museum announced yesterday that "Spain's minister of culture, Inigo Cavero, the head of the Spanish museum system, Javier Tusell-Gomez, and the counsel general of Spain, Maximo Cajal, formally accepted possession of, and responsibility for, the work."

Also returned were the 62 studies and "postscripts" for "Guernica," which since 1939 had been displayed with the mural. They will arrive by air in Spain sometime this morning.

"Guernica," with its howling horse, its victims and its mournful color scheme, is probably the painter's best-known work of art.

The exact date of the mural's arrival at the Prado has not been disclosed. No doubt security will be tight, especially because Basque nationalists have claimed a right to the picture. Richard E. Oldenburg, the New York museum's director, yesterday cited "overriding security considerations" in apologizing for not giving "advance notice to our public that its departure was so imminent."