The most important artistic influence from 20th century Europe on Latin American magical realism was surrealism.
Surrealism was a philosophy of creativity expressed in all areas of the arts, including literature and visual arts. The term was popularized in France by Andre Breton. Associated with direct access to the unconscious, including its manifestations in dreams, surrealism drew heavily on Freudian psychology. Many surrealists were also very politically active, also taking inspiration from the anti-establishment positions and actions of revolutionary Marxism.
Especially during the Nazi rise to power in Germany and occupation of France, many surrealists fled Europe and traveled or settled in Latin America. The combination of fantastic themes and imagery with leftist political activism was well suited to many aspects of the Latin American situation and affected the up-and-coming generation of creative people from the 1940s onward. An affinity with pre-Columbian cultural concepts and art styles is also a significant connection.
Colombian author Gabriel Garcia Marquez, for one, saw the influence running in the other direction, noting that in Mexico, "surrealism runs through the streets."