In 1941, as the Second World War raged, the Soviet Union and Britain occupied Iran under an agreement that ensured vital Iranian oil would keep flowing northward into the Soviet war machine then fighting Hitler. The two Great Powers pledged to withdraw their military forces within six months of the end of the war. Until that time they used Iran as a valuable supply depot and transit station to supply the USSR in its hour of need.