<P> During World War II, many South Africans saw military service . The Union of South Africa participated with other British Commonwealth forces in battles in North Africa against Erwin Rommel and his Afrika Korps, and many South African pilots joined the Royal Air Force and fought against the Axis powers in the European theatre . </P> <P> On the eve of World War II, the Union of South Africa found itself in a unique political and military quandary . While it was closely allied with Great Britain, being a co-equal Dominion under the 1931 Statute of Westminster with its head of state being the British king, the South African Prime Minister on 1 September 1939 was J.B.M. Hertzog--the leader of the pro-Afrikaner and anti-British National Party . The National Party had joined in a unity government with the pro-British South African Party of Jan Smuts in 1934 as the United Party . </P> <P> Hertzog's problem was that South Africa was constitutionally obligated to support Great Britain against Nazi Germany . The Polish - British Common Defence Pact obligated Britain, and in turn its dominions, to help Poland if attacked by the Nazis . When Adolf Hitler's forces attacked Poland on 1 September 1939, Britain declared war on Germany two days later . A short but furious debate unfolded in South Africa, especially in the halls of power in the Parliament of South Africa . It pitted those who sought to enter the war on Britain's side, led by Smuts, against those who wanted to keep South Africa neutral, led by Hertzog . </P> <P> On 4 September 1939, the United Party caucus refused to accept Hertzog's stance of neutrality in World War II and deposed him in favour of Smuts . Upon becoming Prime Minister, Smuts declared South Africa officially at war with Germany and the Axis . He immediately set about fortifying South Africa against any possible German sea invasion because of South Africa's global strategic importance controlling the long sea route around the Cape of Good Hope . </P>

What role did south africa play in ww2