Picasso had been politically sympathetic to the International Anarchist Movement in his formative years and his art often betrayed this. It was, around the turn of the century, full of commentary concerning the the poor and dejected working classes in a corrupt, industrial society. By the 1920's, with to the decline of the anarchist movement, Picasso began leaning toward communism. Revolutionary art, went hand-in- hand with revolutionary politics. At the time of the Spanish Civil War, Picasso sided with the Republicans, who in turn had been supported by the Communists. He openly supported their struggle against Franco and Fascism.
When the German Luftwaffe bombed the Basque town of Gurnika in April 1937, the world was horrified. The destruction and deliberate liquidation of civilians was unprecedented. Picasso responed by showing the world what he thought. In Guernica, his most famous painting, he employed symbolic forms to demonstrate his loathing for all that Fascism represented. He characteristically denied this afterwards in an interview with Jerome Seckler. Picasso was not disposed to giving any of Guernica's secrets away.
In the same year as a part of Hitler's program against 'degenerate art', Picasso's paintings, as well as those of many other famous modern artists, were subjected to ridicule, destruction and public denouncement. Such art was considered by the Nazis to be damaging to the moral fabric of society.
The German authorities clearly knew of Picasso's loathing for Fascism as soon as Guernica was exhibited in The Spanish pavilion at the 1937 Universal Exhibition. The mural was an extremely powerful denouncement of Hitler and Franco that they knew would echo around the world.
When the Germans occupied France in 1939, Picasso defiantly stood his ground despite being the foremost 'degenerate' artist in the world. German officers often called at his studio and interrogated him about his activities or about rumours of him being Jewish. But, despite this inconvenience, he was never hounded, or arrested and his work was never confiscated.
By this time perhaps Picasso was no longer seen as a political threat. But as a foreigner, with Communist affiliations, and as the painter of Guernica, he was in a very precarious position.
This begs the question, why did the Germans not put an end to Picasso when they had a perfect opportunity to do so?
Arno Breker, Hitler's favorite sculptor, denied interceding with the Germans on Picasso's behalf, but it seems likely that someone of influence, somewhere, may have been protecting him. Due to Picasso's fame, the German authorities may have thought it wise not to make him a martyr. Considering the international embarrassment that Picasso caused the Germans, if such a decision was made to protect Picasso, it would almost certainly have been referred back to Hitler.
Picasso's decision to sit out the Occupation. despite the immense danger to his life, has never been satisfactorily explained.
For more information about this period in Picasso's life, read: Picasso and His Art During The German Occupation 1939-1944, Mary Margaret Goggin, Stanford University Phd, 1985, University Microfilms International, Ann Arbor, Michigan.