To counterbalance British and Soviet influence, Reza Shah encouraged German commercial enterprise in Iran. On the eve of World War II, Germany was Iran's largest trading partner. The Germans agreed to sell the Shah the steel factory he coveted and considered a "sine qua non" of progress and modernity. His foreign policy, which had consisted essentially of playing the Soviet Union off against the United Kingdom, failed when those two powers joined in 1941 to fight the Germans. To supply the Soviet forces with war material through Iran, the two allies jointly invaded and occupied the country in August 1941.