What war is Hemingway's for whom the bell tolls set in?

Background: The Spanish Civil War from the early autumn of 1936 to the spring of 1939 was the prelude to the European front of World War II, and it was also the first contest between the world's progressive forces and the German fascist regime. Due to various complicated historical reasons, the progressive forces failed in this struggle. At that time, countless internationalist fighters from all over the world went to the front line of Spain, which strongly supported the Spanish people's anti-fascist struggle. As a war correspondent, Hemingway witnessed this feat and wrote this world famous book praising the just war and reflecting the panorama of the Spanish civil war.

For Whom the Bell Tolls is a novel written by American writer Hemingway in 1940. It is one of Hemingway's representative works with the theme of Americans participating in the Spanish people's anti-fascist war.

Introduction:

The story tells that Robert Jordan, an American youth, teaches Spanish in a university and has deep feelings for Spain. He volunteered to join the Spanish government forces and engaged in blasting activities behind enemy lines. In order to cooperate with the counterattack, he was ordered to contact the local guerrillas and complete the task of bombing the bridge. He won the support of bilal, the wife of guerrilla captain Pablo, and other players, isolated Pablo, who had lost his fighting spirit, and arranged his specific tasks step by step. In the raging war, he fell in love with Maria, a little girl who was taken in by bilal and spoiled by the enemy, and healed the trauma of Maria's heart. In these three days, Robert experienced the conflict between love and responsibility and the test of life and death, and his humanity was constantly sublimated. When the bridge was bombed and retreated, he was injured in the thigh by the enemy, stayed alone to stop the enemy, and finally dedicated his young life to the Spanish people.